diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
commit | 10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch) | |
tree | 4bc444c00a79e88105f2cfce5b6209994c413ca0 /kdecore/kapplication.cpp | |
parent | 307136d8eef0ba133b78ceee8e901138d4c996a1 (diff) | |
download | tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kapplication.cpp')
-rw-r--r-- | kdecore/kapplication.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp index 08e6c7652..3dc8ca77d 100644 --- a/kdecore/kapplication.cpp +++ b/kdecore/kapplication.cpp @@ -170,7 +170,7 @@ static Atom kde_xdnd_drop; #endif // duplicated from patched Qt, so that there won't be unresolved symbols if Qt gets -// tqreplaced by unpatched one +// replaced by unpatched one KDECORE_EXPORT bool qt_qclipboard_bailout_hack = false; template class TQPtrList<KSessionManaged>; @@ -250,7 +250,7 @@ public: IceIOErrorHandler oldIceIOErrorHandler; KCheckAccelerators* checkAccelerators; TQString overrideStyle; - TQString tqgeometry_arg; + TQString geometry_arg; TQCString startup_id; TQTimer* app_started_timer; KAppDCOPInterface *m_KAppDCOPInterface; @@ -466,7 +466,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event) // We have a keypress for a lineedit... TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event); KKey key(kevent); - if (_selectAll.tqcontains(key)) + if (_selectAll.contains(key)) { if (t == TQEvent::KeyPress) { @@ -503,7 +503,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event) { // We have a keypress for a multilineedit... TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event); - if (_selectAll.tqcontains(KKey(kevent))) + if (_selectAll.contains(KKey(kevent))) { if (t == TQEvent::KeyPress) { @@ -519,7 +519,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event) } if( t == TQEvent::Show && receiver->isWidgetType()) { - TQWidget* w = static_cast< TQWidget* >( static_cast<QObject*>(receiver) ); + TQWidget* w = static_cast< TQWidget* >( receiver ); #if defined Q_WS_X11 if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<TQShowEvent*>(event)->spontaneous()) // TODO better done using window group leader? KStartupInfo::setWindowStartupId( w->winId(), startupId()); @@ -765,7 +765,7 @@ class KDETranslator : public TQTranslator { public: KDETranslator(TQObject *parent) : TQTranslator(parent, "kdetranslator") {} - virtual TQTranslatorMessage tqfindMessage(const char* context, + virtual TQTranslatorMessage findMessage(const char* context, const char *sourceText, const char* message) const { @@ -832,7 +832,7 @@ void KApplication::init(bool GUIenabled) smw = 0; - // Initial KIPC event tqmask. + // Initial KIPC event mask. #if defined Q_WS_X11 kipcEventMask = (1 << KIPC::StyleChanged) | (1 << KIPC::PaletteChanged) | (1 << KIPC::FontChanged) | (1 << KIPC::BackgroundChanged) | @@ -901,7 +901,7 @@ void KApplication::init(bool GUIenabled) TQMimeSourceFactory::addFactory( oldDefaultFactory ); } - d->checkAccelerators = new KCheckAccelerators( TQT_TQOBJECT(this) ); + d->checkAccelerators = new KCheckAccelerators( this ); } #ifdef Q_WS_MACX @@ -934,16 +934,16 @@ void KApplication::init(bool GUIenabled) // save and restore the RTL setting, as installTranslator calls qt_detectRTLLanguage, // which makes it impossible to use the -reverse cmdline switch with KDE apps bool rtl = reverseLayout(); - installTranslator(new KDETranslator(TQT_TQOBJECT(this))); + installTranslator(new KDETranslator(this)); setReverseLayout( rtl ); if (i18n( "_: Dear Translator! Translate this string to the string 'LTR' in " "left-to-right languages (as english) or to 'RTL' in right-to-left " - "languages (such as Hebrew and Arabic) to get proper widget tqlayout." ) == "RTL") + "languages (such as Hebrew and Arabic) to get proper widget layout." ) == "RTL") setReverseLayout( !rtl ); // install appdata resource type KGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data") - + TQString::tqfromLatin1(name()) + '/'); + + TQString::fromLatin1(name()) + '/'); pSessionConfig = 0L; bSessionManagement = true; @@ -1179,9 +1179,9 @@ void KApplication::propagateSessionManager() TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver")); TQCString display = ::getenv(DISPLAY); // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); int i; - while( (i = display.tqfind(':')) >= 0) + while( (i = display.find(':')) >= 0) display[i] = '_'; fName += "_"+display; @@ -1222,7 +1222,7 @@ void KApplication::commitData( QSessionManager& sm ) if ( sm.allowsInteraction() ) { TQWidgetList done; - TQWidgetList *list = TQApplication::tqtopLevelWidgets(); + TQWidgetList *list = TQApplication::topLevelWidgets(); bool canceled = false; TQWidget* w = list->first(); while ( !canceled && w ) { @@ -1233,12 +1233,12 @@ void KApplication::commitData( QSessionManager& sm ) if ( !canceled ) done.append( w ); delete list; // one never knows... - list = TQApplication::tqtopLevelWidgets(); + list = TQApplication::topLevelWidgets(); w = list->first(); } else { w = list->next(); } - while ( w && done.tqcontainsRef( w ) ) + while ( w && done.containsRef( w ) ) w = list->next(); } delete list; @@ -1380,9 +1380,9 @@ void KApplication::startKdeinit() return; // whoever held the lock has already started dcopserver } // Try to launch kdeinit. - TQString srv = KStandardDirs::findExe(TQString::tqfromLatin1("kdeinit")); + TQString srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit")); if (srv.isEmpty()) - srv = KStandardDirs::findExe(TQString::tqfromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir()); + srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir()); if (srv.isEmpty()) return; if (kapp && (Tty != kapp->type())) @@ -1467,7 +1467,7 @@ static const KCmdLineOptions qt_options[] = #ifdef Q_WS_QWS { "qws", I18N_NOOP("forces the application to run as QWS Server"), 0}, #endif - { "reverse", I18N_NOOP("mirrors the whole tqlayout of widgets"), 0}, + { "reverse", I18N_NOOP("mirrors the whole layout of widgets"), 0}, KCmdLineLastOption }; @@ -1481,7 +1481,7 @@ static const KCmdLineOptions kde_options[] = { "nocrashhandler", I18N_NOOP("Disable crash handler, to get core dumps"), 0}, { "waitforwm", I18N_NOOP("Waits for a WM_NET compatible windowmanager"), 0}, { "style <style>", I18N_NOOP("sets the application GUI style"), 0}, - { "tqgeometry <tqgeometry>", I18N_NOOP("sets the client tqgeometry of the main widget - see man X for the argument format"), 0}, + { "geometry <geometry>", I18N_NOOP("sets the client geometry of the main widget - see man X for the argument format"), 0}, { "smkey <sessionKey>", 0, 0}, // this option is obsolete and exists only to allow smooth upgrades from sessions // saved under Qt 3.0.x -- Qt 3.1.x includes the session key now automatically in // the session id (Simon) @@ -1589,9 +1589,9 @@ void KApplication::parseCommandLine( ) // FIXME(E): Implement for Qt Embedded #endif - if (args->isSet("tqgeometry")) + if (args->isSet("geometry")) { - d->tqgeometry_arg = args->getOption("tqgeometry"); + d->geometry_arg = args->getOption("geometry"); } if (args->isSet("smkey")) @@ -1603,7 +1603,7 @@ void KApplication::parseCommandLine( ) TQString KApplication::geometryArgument() const { - return d->tqgeometry_arg; + return d->geometry_arg; } TQPixmap KApplication::icon() const @@ -1883,13 +1883,13 @@ void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned void KApplication::invokeEditSlot( const char *slot ) { - TQObject *object = TQT_TQOBJECT(tqfocusWidget()); + TQObject *object = focusWidget(); if( !object ) return; - TQMetaObject *meta = object->tqmetaObject(); + TQMetaObject *meta = object->metaObject(); - int idx = meta->tqfindSlot( slot + 1, true ); + int idx = meta->findSlot( slot + 1, true ); if( idx < 0 ) return; @@ -1900,7 +1900,7 @@ void KApplication::addKipcEventMask(int id) { if (id >= 32) { - kdDebug(101) << "Cannot use KIPC event tqmask for message IDs >= 32\n"; + kdDebug(101) << "Cannot use KIPC event mask for message IDs >= 32\n"; return; } kipcEventMask |= (1 << id); @@ -1910,7 +1910,7 @@ void KApplication::removeKipcEventMask(int id) { if (id >= 32) { - kdDebug(101) << "Cannot use KIPC event tqmask for message IDs >= 32\n"; + kdDebug(101) << "Cannot use KIPC event mask for message IDs >= 32\n"; return; } kipcEventMask &= ~(1 << id); @@ -2452,10 +2452,10 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const TQString command = config.readPathEntry("EmailClient"); TQString to, cc, bcc; - if (command.isEmpty() || command == TQString::tqfromLatin1("kmail") + if (command.isEmpty() || command == TQString::fromLatin1("kmail") || command.endsWith("/kmail")) { - command = TQString::tqfromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t"); + command = TQString::fromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t"); if ( !_to.isEmpty() ) { // put the whole address lists into RFC2047 encoded blobs; technically @@ -2473,7 +2473,7 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const to = _to; cc = _cc; bcc = _bcc; - if( !command.tqcontains( '%' )) + if( !command.contains( '%' )) command += " %u"; } @@ -2826,7 +2826,7 @@ TQString KApplication::tempSaveName( const TQString& pFilename ) const } } - aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); + aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); return aFilename; } @@ -2855,7 +2855,7 @@ TQString KApplication::checkRecoverFile( const TQString& pFilename, } } - aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); + aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); if( TQFile( aFilename ).exists() ) { @@ -2888,7 +2888,7 @@ bool checkAccess(const TQString& pathname, int mode) //strip the filename (everything until '/' from the end TQString dirName(pathname); - int pos = dirName.tqfindRev('/'); + int pos = dirName.findRev('/'); if ( pos == -1 ) return false; // No path in argument. This is evil, we won't allow this else if ( pos == 0 ) // don't turn e.g. /root into an empty string @@ -3103,18 +3103,18 @@ void KApplication::initUrlActionRestrictions() bool bEnabled = (strEnabled == "true"); if (refPath.startsWith("$HOME")) - refPath.tqreplace(0, 5, TQDir::homeDirPath()); + refPath.replace(0, 5, TQDir::homeDirPath()); else if (refPath.startsWith("~")) - refPath.tqreplace(0, 1, TQDir::homeDirPath()); + refPath.replace(0, 1, TQDir::homeDirPath()); if (urlPath.startsWith("$HOME")) - urlPath.tqreplace(0, 5, TQDir::homeDirPath()); + urlPath.replace(0, 5, TQDir::homeDirPath()); else if (urlPath.startsWith("~")) - urlPath.tqreplace(0, 1, TQDir::homeDirPath()); + urlPath.replace(0, 1, TQDir::homeDirPath()); if (refPath.startsWith("$TMP")) - refPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); if (urlPath.startsWith("$TMP")) - urlPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + urlPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); d->urlActionRestrictions.append(new KApplicationPrivate::URLActionRule ( action, refProt, refHost, refPath, urlProt, urlHost, urlPath, bEnabled)); |