diff options
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/blockingkprocess.cpp | 16 | ||||
-rw-r--r-- | lib/util/blockingkprocess.h | 3 | ||||
-rw-r--r-- | lib/util/configwidgetproxy.cpp | 10 | ||||
-rw-r--r-- | lib/util/configwidgetproxy.h | 9 | ||||
-rw-r--r-- | lib/util/domutil.cpp | 18 | ||||
-rw-r--r-- | lib/util/domutil.h | 16 | ||||
-rw-r--r-- | lib/util/execcommand.cpp | 12 | ||||
-rw-r--r-- | lib/util/execcommand.h | 11 | ||||
-rw-r--r-- | lib/util/filetemplate.cpp | 28 | ||||
-rw-r--r-- | lib/util/kdeveditorutil.cpp | 4 | ||||
-rw-r--r-- | lib/util/kdevjobtimer.cpp | 4 | ||||
-rw-r--r-- | lib/util/kdevjobtimer.h | 5 | ||||
-rw-r--r-- | lib/util/kdevshellwidget.cpp | 8 | ||||
-rw-r--r-- | lib/util/kdevshellwidget.h | 5 | ||||
-rw-r--r-- | lib/util/kscriptactionmanager.cpp | 6 | ||||
-rw-r--r-- | lib/util/kscriptactionmanager.h | 4 | ||||
-rw-r--r-- | lib/util/rurl.cpp | 16 | ||||
-rw-r--r-- | lib/util/rurl.h | 6 | ||||
-rw-r--r-- | lib/util/settings.cpp | 10 | ||||
-rw-r--r-- | lib/util/urlutil.cpp | 30 | ||||
-rw-r--r-- | lib/util/urlutil.h | 26 |
21 files changed, 127 insertions, 120 deletions
diff --git a/lib/util/blockingkprocess.cpp b/lib/util/blockingkprocess.cpp index 9c9d9130..2a99f23b 100644 --- a/lib/util/blockingkprocess.cpp +++ b/lib/util/blockingkprocess.cpp @@ -14,8 +14,8 @@ #include <tqapplication.h> #include <tqtimer.h> -BlockingKProcess::BlockingKProcess(TQObject *parent, const char *name) - : KProcess(parent, name) +BlockingKProcess::BlockingKProcess(TQObject *tqparent, const char *name) + : KProcess(tqparent, name) { m_stdOut = ""; m_stdErr = ""; @@ -68,24 +68,24 @@ bool BlockingKProcess::start(RunMode runmode, Communication comm) void BlockingKProcess::slotReceivedStdOut(KProcess *, char *buffer, int buflen) { - m_stdOut += TQString::fromLatin1(buffer, buflen); + m_stdOut += TQString::tqfromLatin1(buffer, buflen); } void BlockingKProcess::slotReceivedStdErr(KProcess *, char *buffer, int buflen) { - m_stdErr += TQString::fromLatin1(buffer, buflen); + m_stdErr += TQString::tqfromLatin1(buffer, buflen); } void BlockingKProcess::slotProcessExited(KProcess *) { - qApp->exit_loop(); + tqApp->exit_loop(); } void BlockingKProcess::slotTimeOut() { m_timeout = true; kill(); - qApp->exit_loop(); + tqApp->exit_loop(); } @@ -95,9 +95,9 @@ void qt_leave_modal( TQWidget *widget ); void BlockingKProcess::enter_loop() { TQWidget dummy(0,0,WType_Dialog | WShowModal); - dummy.setFocusPolicy( TQWidget::NoFocus ); + dummy.setFocusPolicy( TQ_NoFocus ); qt_enter_modal(&dummy); - qApp->enter_loop(); + tqApp->enter_loop(); qt_leave_modal(&dummy); } diff --git a/lib/util/blockingkprocess.h b/lib/util/blockingkprocess.h index 4006af74..dd15002e 100644 --- a/lib/util/blockingkprocess.h +++ b/lib/util/blockingkprocess.h @@ -31,9 +31,10 @@ class TQTimer; class BlockingKProcess : public KProcess { Q_OBJECT + TQ_OBJECT public: - BlockingKProcess(TQObject *parent, const char *name=0); + BlockingKProcess(TQObject *tqparent, const char *name=0); BlockingKProcess(); virtual ~BlockingKProcess(); diff --git a/lib/util/configwidgetproxy.cpp b/lib/util/configwidgetproxy.cpp index 66f267b7..5ce6becf 100644 --- a/lib/util/configwidgetproxy.cpp +++ b/lib/util/configwidgetproxy.cpp @@ -43,12 +43,12 @@ ConfigWidgetProxy::~ConfigWidgetProxy() void ConfigWidgetProxy::createGlobalConfigPage( TQString const & title, unsigned int pagenumber, TQString const & icon ) { - _globalTitleMap.insert( pagenumber, qMakePair( title, icon ) ); + _globalTitleMap.insert( pagenumber, tqMakePair( title, icon ) ); } void ConfigWidgetProxy::createProjectConfigPage( TQString const & title, unsigned int pagenumber, TQString const & icon ) { - _projectTitleMap.insert( pagenumber, qMakePair( title, icon ) ); + _projectTitleMap.insert( pagenumber, tqMakePair( title, icon ) ); } void ConfigWidgetProxy::removeConfigPage( int pagenumber ) @@ -92,14 +92,14 @@ void ConfigWidgetProxy::slotAboutToShowPage( TQWidget * page ) { if ( !page ) return; - PageMap::Iterator it = _pageMap.find( page ); + PageMap::Iterator it = _pageMap.tqfind( page ); if ( it != _pageMap.end() ) { - emit insertConfigWidget( static_cast<KDialogBase*>(const_cast<TQObject*>(sender())), page, it.data() ); + emit insertConfigWidget( static_cast<KDialogBase*>(TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))), page, it.data() ); _pageMap.remove( it ); } } #include "configwidgetproxy.moc" -// kate: space-indent off; indent-width 4; replace-tabs off; tab-width 4; +// kate: space-indent off; indent-width 4; tqreplace-tabs off; tab-width 4; diff --git a/lib/util/configwidgetproxy.h b/lib/util/configwidgetproxy.h index 1ba7e5c5..c35c09c9 100644 --- a/lib/util/configwidgetproxy.h +++ b/lib/util/configwidgetproxy.h @@ -68,9 +68,10 @@ void MyPart::insertConfigWidget( TQObject const * dlg, TQWidget * page, unsigned Note that this replaces the functionality of typical KDevCore::configWidget() and KDevCore::projectConfigWidget() slots. */ -class ConfigWidgetProxy : public QObject +class ConfigWidgetProxy : public TQObject { Q_OBJECT + TQ_OBJECT public: /**Constructor. @@ -104,7 +105,7 @@ signals: /** * The proxy emits this signal to notify the client that a specific config page has been requested. * @param dlg The settings dialog. The client should connect to its okClicked() signal. - * @param page The setting page. The client should use this as parent to the config widget. + * @param page The setting page. The client should use this as tqparent to the config widget. * @param pagenumber The identifier set in createGlobalConfigPage() or createProjectConfigPage(). Identifies the requested config page. */ void insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int pagenumber ); @@ -116,7 +117,7 @@ private slots: void slotAboutToShowPage( TQWidget * page ); private: - typedef TQMap<unsigned int, QPair<TQString,TQString> > TitleMap; + typedef TQMap<unsigned int, TQPair<TQString,TQString> > TitleMap; typedef TQMap<TQWidget*, int> PageMap; TitleMap _globalTitleMap; @@ -126,4 +127,4 @@ private: #endif -// kate: space-indent off; indent-width 4; replace-tabs off; tab-width 4; +// kate: space-indent off; indent-width 4; tqreplace-tabs off; tab-width 4; diff --git a/lib/util/domutil.cpp b/lib/util/domutil.cpp index 9f5d40c9..a8f036e6 100644 --- a/lib/util/domutil.cpp +++ b/lib/util/domutil.cpp @@ -57,7 +57,7 @@ TQString DomUtil::readEntryAux(const TQDomDocument &doc, const TQString &path) { TQDomElement el = elementByPath(doc, path); if (el.isNull()) - return TQString::null; + return TQString(); else return el.firstChild().toText().data(); } @@ -260,18 +260,18 @@ TQDomElement DomUtil::elementByPathExt(TQDomDocument &doc, const TQString &paths { DomPath dompath = resolvPathStringExt(pathstring); TQDomElement elem = doc.documentElement(); - TQDomNodeList children; + TQDomNodeList tqchildren; TQDomElement nextElem = elem; for (unsigned int j=0; j<dompath.count(); j++) { - children = nextElem.childNodes(); + tqchildren = nextElem.childNodes(); DomPathElement dompathelement= dompath[j]; bool wrongchild = false; int matchCount = 0; - for (unsigned int i=0; i<children.count(); i++) + for (unsigned int i=0; i<tqchildren.count(); i++) { wrongchild = false; - TQDomElement child = children.item(i).toElement(); + TQDomElement child = tqchildren.item(i).toElement(); TQString tag = child.tagName(); tag = dompathelement.tagName; if (child.tagName() == dompathelement.tagName) @@ -339,10 +339,10 @@ bool DomUtil::removeTextNodes(TQDomDocument doc,TQString pathExt) TQDomElement elem = elementByPathExt(doc,pathExt); if (elem.isNull()) return false; - TQDomNodeList children = elem.childNodes(); - for (unsigned int i=0;i<children.count();i++) - if (children.item(i).isText()) - elem.removeChild(children.item(i)); + TQDomNodeList tqchildren = elem.childNodes(); + for (unsigned int i=0;i<tqchildren.count();i++) + if (tqchildren.item(i).isText()) + elem.removeChild(tqchildren.item(i)); return true; } diff --git a/lib/util/domutil.h b/lib/util/domutil.h index 08d2571a..394b3600 100644 --- a/lib/util/domutil.h +++ b/lib/util/domutil.h @@ -45,7 +45,7 @@ typedef TQValueList<DomPathElement> DomPath; class DomUtil { public: - typedef QPair<TQString, TQString> Pair; + typedef TQPair<TQString, TQString> Pair; typedef TQValueList<Pair> PairList; /** * Remove all child elements from a given element. @@ -54,7 +54,7 @@ public: /** * Reads a string entry. */ - static TQString readEntry(const TQDomDocument &doc, const TQString &path, const TQString &defaultEntry = TQString::null); + static TQString readEntry(const TQDomDocument &doc, const TQString &path, const TQString &defaultEntry = TQString()); /** * Reads a number entry. */ @@ -168,13 +168,13 @@ public: Retrieve an element specified with extended path examples: - - 1: "widget|class=QDialog/property|name=geometry" - or "widget|class=QDialog/property||1" + - 1: "widget|class=TQDialog/property|name=tqgeometry" + or "widget|class=TQDialog/property||1" - 2: "widget/property|name=caption/string" or "widget/property||2/string" . \verbatim - <widget class="TQDialog"> + <widget class=TQDIALOG_OBJECT_NAME_STRING> <property name="name"> <cstring>KdevFormName</cstring> </property> @@ -205,17 +205,17 @@ public: static bool saveDOMFile(TQDomDocument &doc, TQString filename); /** - * Remove all child text nodes of parent described in pathExt + * Remove all child text nodes of tqparent described in pathExt */ static bool removeTextNodes(TQDomDocument doc,TQString pathExt); /** - * Add child text node to parent described in pathExt + * Add child text node to tqparent described in pathExt */ static bool appendText(TQDomDocument doc, TQString pathExt, TQString text); /** - * Replace all chilt text nodes of parent described in pathExt with one new. + * Replace all chilt text nodes of tqparent described in pathExt with one new. */ static bool replaceText(TQDomDocument doc, TQString pathExt, TQString text); diff --git a/lib/util/execcommand.cpp b/lib/util/execcommand.cpp index 7c4fea89..e1236474 100644 --- a/lib/util/execcommand.cpp +++ b/lib/util/execcommand.cpp @@ -26,8 +26,8 @@ ExecCommand::ExecCommand( const TQString& executable, const TQStringList& args, const TQString& workingDir, const TQStringList& env, - TQObject* parent, const char* name ): - TQObject( parent, name ), out( "" ) /* make sure out is not TQString::null since that would mean "error" */ + TQObject* tqparent, const char* name ): + TQObject( tqparent, name ), out( "" ) /* make sure out is not TQString() since that would mean "error" */ { progressDlg = 0; @@ -49,15 +49,15 @@ ExecCommand::ExecCommand( const TQString& executable, const TQStringList& args, bool ok = proc->start( KProcess::NotifyOnExit, KProcess::AllOutput ); if ( !ok ) { - KMessageBox::error( 0, i18n("Could not invoke \"%1\". Please make sure it is installed correctly").arg( executable ), + KMessageBox::error( 0, i18n("Could not invoke \"%1\". Please make sure it is installed correctly").tqarg( executable ), i18n("Error Invoking Command") ); - emit finished( TQString::null, TQString::null ); + emit finished( TQString(), TQString() ); deleteLater(); } else { progressDlg = new KProgressDialog( 0, 0, i18n("Command running..."), - i18n("Please wait until the \"%1\" command finishes.").arg( executable ), false ); + i18n("Please wait until the \"%1\" command finishes.").tqarg( executable ), false ); connect( progressDlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelClicked()) ); } @@ -88,7 +88,7 @@ void ExecCommand::cancelClicked() progressDlg = 0; proc->kill(); - emit finished( TQString::null, TQString::null ); + emit finished( TQString(), TQString() ); deleteLater(); } diff --git a/lib/util/execcommand.h b/lib/util/execcommand.h index c3e20d47..5be67682 100644 --- a/lib/util/execcommand.h +++ b/lib/util/execcommand.h @@ -37,18 +37,19 @@ Command execution facilities. * a progress dialog with the possibility to cancel the command. * * If there was an error or the user pressed cancel, finished () - * will emit a TQString::null, otherwise QStrings containing the stdout/stderr. + * will emit a TQString(), otherwise TQStrings containing the stdout/stderr. * * The object will delete itself after the finished signal has been emitted. - * Additional environment can be set in the TQStringList env via QStrings with the format "foo=blah" + * Additional environment can be set in the TQStringList env via TQStrings with the format "foo=blah" */ -class ExecCommand : public QObject +class ExecCommand : public TQObject { Q_OBJECT + TQ_OBJECT public: ExecCommand( const TQString& executable, const TQStringList& args, - const TQString& workingDir = TQString::null, - const TQStringList& env = TQStringList(), TQObject* parent = 0, const char* name = 0 ); + const TQString& workingDir = TQString(), + const TQStringList& env = TQStringList(), TQObject* tqparent = 0, const char* name = 0 ); ~ExecCommand(); signals: diff --git a/lib/util/filetemplate.cpp b/lib/util/filetemplate.cpp index cbf4f8bb..f153642f 100644 --- a/lib/util/filetemplate.cpp +++ b/lib/util/filetemplate.cpp @@ -56,7 +56,7 @@ TQString FileTemplate::readFile(KDevPlugin *part, const TQString &fileName) TQFile f(fileName); if (!f.open(IO_ReadOnly)) - return TQString::null; + return TQString(); TQTextStream stream(&f); TQString str = stream.read(); @@ -69,19 +69,19 @@ TQString FileTemplate::makeSubstitutions( TQDomDocument & dom, const TQString & TQString email = DomUtil::readEntry(dom, "/general/email"); TQString version = DomUtil::readEntry(dom, "/general/version"); TQString appname = DomUtil::readEntry(dom, "/general/projectname"); - TQString date = TQDate::currentDate().toString(); - TQString year = TQString::number(TQDate::currentDate().year()); + TQString date = TQDate::tqcurrentDate().toString(); + TQString year = TQString::number(TQDate::tqcurrentDate().year()); TQString str = text; - str.replace(TQRegExp("\\$EMAIL\\$"),email); - str.replace(TQRegExp("\\$AUTHOR\\$"),author); - str.replace(TQRegExp("\\$VERSION\\$"),version); - str.replace(TQRegExp("\\$DATE\\$"),date); - str.replace(TQRegExp("\\$YEAR\\$"),year); - str.replace(TQRegExp("\\$APPNAME\\$"),appname); - str.replace(TQRegExp("\\$APPNAME\\$"),appname); - str.replace(TQRegExp("\\$APPNAMEUC\\$"),appname.upper()); - str.replace(TQRegExp("\\$APPNAMELC\\$"),appname.lower()); + str.tqreplace(TQRegExp("\\$EMAIL\\$"),email); + str.tqreplace(TQRegExp("\\$AUTHOR\\$"),author); + str.tqreplace(TQRegExp("\\$VERSION\\$"),version); + str.tqreplace(TQRegExp("\\$DATE\\$"),date); + str.tqreplace(TQRegExp("\\$YEAR\\$"),year); + str.tqreplace(TQRegExp("\\$APPNAME\\$"),appname); + str.tqreplace(TQRegExp("\\$APPNAME\\$"),appname); + str.tqreplace(TQRegExp("\\$APPNAMEUC\\$"),appname.upper()); + str.tqreplace(TQRegExp("\\$APPNAMELC\\$"),appname.lower()); return str; } @@ -99,8 +99,8 @@ bool FileTemplate::copy(KDevPlugin *part, const TQString &name, TQFileInfo fi(f); TQString module = fi.baseName(); TQString basefilename = fi.baseName(true); - text.replace(TQRegExp("\\$MODULE\\$"),module); - text.replace(TQRegExp("\\$FILENAME\\$"),basefilename); + text.tqreplace(TQRegExp("\\$MODULE\\$"),module); + text.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename); TQTextStream stream(&f); stream << text; diff --git a/lib/util/kdeveditorutil.cpp b/lib/util/kdeveditorutil.cpp index ca946ce6..3c01f780 100644 --- a/lib/util/kdeveditorutil.cpp +++ b/lib/util/kdeveditorutil.cpp @@ -66,7 +66,7 @@ TQString KDevEditorUtil::currentWord( KTextEditor::Document * doc, KTextEditor:: TQString linestr = editIface->textLine(line); - int startPos = QMAX( QMIN( (int)col, (int)linestr.length()-1 ), 0 ); + int startPos = TQMAX( TQMIN( (int)col, (int)linestr.length()-1 ), 0 ); int endPos = startPos; startPos--; while (startPos >= 0 && ( linestr[startPos].isLetterOrNumber() || linestr[startPos] == '_' || linestr[startPos] == '~') ) @@ -74,7 +74,7 @@ TQString KDevEditorUtil::currentWord( KTextEditor::Document * doc, KTextEditor:: while (endPos < (int)linestr.length() && ( linestr[endPos].isLetterOrNumber() || linestr[endPos] == '_' ) ) endPos++; - return ( ( startPos == endPos ) ? TQString::null : linestr.mid( startPos+1, endPos-startPos-1 ) ); + return ( ( startPos == endPos ) ? TQString() : linestr.mid( startPos+1, endPos-startPos-1 ) ); } diff --git a/lib/util/kdevjobtimer.cpp b/lib/util/kdevjobtimer.cpp index b0b78250..a4ac7aa2 100644 --- a/lib/util/kdevjobtimer.cpp +++ b/lib/util/kdevjobtimer.cpp @@ -11,8 +11,8 @@ #include "kdevjobtimer.h" -KDevJobTimer::KDevJobTimer( void * payload, TQObject *parent, const char *name) - : TQTimer(parent, name) +KDevJobTimer::KDevJobTimer( void * payload, TQObject *tqparent, const char *name) + : TQTimer(tqparent, name) { m_payload = payload; connect( this, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); diff --git a/lib/util/kdevjobtimer.h b/lib/util/kdevjobtimer.h index 19915d06..5fb9dbba 100644 --- a/lib/util/kdevjobtimer.h +++ b/lib/util/kdevjobtimer.h @@ -14,9 +14,10 @@ #include <tqtimer.h> -class KDevJobTimer : public QTimer +class KDevJobTimer : public TQTimer { Q_OBJECT + TQ_OBJECT public: static void singleShot( int msec, TQObject * receiver, const char * member, void * payload ); @@ -24,7 +25,7 @@ signals: void timeout(void*); private: - KDevJobTimer( void * payload, TQObject *parent = 0, const char *name = 0); + KDevJobTimer( void * payload, TQObject *tqparent = 0, const char *name = 0); ~KDevJobTimer(); private slots: diff --git a/lib/util/kdevshellwidget.cpp b/lib/util/kdevshellwidget.cpp index f9f07fd8..0ea05299 100644 --- a/lib/util/kdevshellwidget.cpp +++ b/lib/util/kdevshellwidget.cpp @@ -20,8 +20,8 @@ #include "kdevshellwidget.h" -KDevShellWidget::KDevShellWidget(TQWidget *parent, const char *name) - : TQVBox(parent, name), m_doAutoActivate( false ), m_isRunning( false ) +KDevShellWidget::KDevShellWidget(TQWidget *tqparent, const char *name) + : TQVBox(tqparent, name), m_doAutoActivate( false ), m_isRunning( false ) { } @@ -41,14 +41,14 @@ void KDevShellWidget::activate( ) KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); if ( !factory ) return; - m_konsolePart = (KParts::ReadOnlyPart *) factory->create( this, "libkonsolepart", "KParts::ReadOnlyPart" ); + m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); if ( !m_konsolePart ) return; connect( m_konsolePart, TQT_SIGNAL( processExited(KProcess *) ), this, TQT_SLOT( processExited(KProcess *) ) ); connect( m_konsolePart, TQT_SIGNAL( receivedData( const TQString& ) ), this, TQT_SIGNAL( receivedData( const TQString& ) ) ); connect( m_konsolePart, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()) ); - m_konsolePart->widget()->setFocusPolicy( TQWidget::WheelFocus ); + m_konsolePart->widget()->setFocusPolicy( TQ_WheelFocus ); setFocusProxy( m_konsolePart->widget() ); m_konsolePart->widget()->setFocus(); diff --git a/lib/util/kdevshellwidget.h b/lib/util/kdevshellwidget.h index 69198a7a..62dbf171 100644 --- a/lib/util/kdevshellwidget.h +++ b/lib/util/kdevshellwidget.h @@ -23,13 +23,14 @@ namespace KParts class ReadOnlyPart; } -class KDevShellWidget : public QVBox +class KDevShellWidget : public TQVBox { Q_OBJECT + TQ_OBJECT public: - KDevShellWidget(TQWidget *parent = 0, const char *name = 0); + KDevShellWidget(TQWidget *tqparent = 0, const char *name = 0); virtual ~KDevShellWidget(); /** diff --git a/lib/util/kscriptactionmanager.cpp b/lib/util/kscriptactionmanager.cpp index ffc3a536..9b764a75 100644 --- a/lib/util/kscriptactionmanager.cpp +++ b/lib/util/kscriptactionmanager.cpp @@ -95,12 +95,12 @@ void KScriptAction::activate( ) } else { - KMessageBox::sorry(0, i18n("Unable to get KScript Runner for type \"%1\".").arg(m_scriptType), i18n("KScript Error")); + KMessageBox::sorry(0, i18n("Unable to get KScript Runner for type \"%1\".").tqarg(m_scriptType), i18n("KScript Error")); kdDebug() << "Query string: " << scriptTypeQuery << endl; return; } } - m_interface->run(parent(), TQVariant()); + m_interface->run(tqparent(), TQVariant()); m_timeout->start(60000,FALSE); // after 1 minute unload m_refs++; } @@ -119,7 +119,7 @@ void KScriptAction::scriptFinished() m_refs--; } -KScriptActionManager::KScriptActionManager( TQObject *parent, KActionCollection * ac ) : TQObject(parent), m_ac(ac) +KScriptActionManager::KScriptActionManager( TQObject *tqparent, KActionCollection * ac ) : TQObject(tqparent), m_ac(ac) { m_actions.setAutoDelete(true); } diff --git a/lib/util/kscriptactionmanager.h b/lib/util/kscriptactionmanager.h index d04c0518..69de43ac 100644 --- a/lib/util/kscriptactionmanager.h +++ b/lib/util/kscriptactionmanager.h @@ -37,6 +37,7 @@ class TQTimer; */ class KScriptAction : public TQObject, public KScriptClientInterface { Q_OBJECT + TQ_OBJECT public: KScriptAction( const TQString &scriptDesktopFile, TQObject *interface, KActionCollection *ac ); @@ -92,12 +93,13 @@ private: */ class KScriptActionManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Create a script manager that is attached to an action collection. */ - KScriptActionManager( TQObject *parent, KActionCollection *ac ); + KScriptActionManager( TQObject *tqparent, KActionCollection *ac ); ~KScriptActionManager(); /** diff --git a/lib/util/rurl.cpp b/lib/util/rurl.cpp index 0d631bda..86ca920a 100644 --- a/lib/util/rurl.cpp +++ b/lib/util/rurl.cpp @@ -113,26 +113,26 @@ TQString Name::extension( bool complete ) const { TQString temp = fileName(); if (complete) - return temp.mid(temp.find('.')+1); + return temp.mid(temp.tqfind('.')+1); else - return temp.mid(temp.findRev('.')+1); + return temp.mid(temp.tqfindRev('.')+1); } - return TQString::null; + return TQString(); } TQString Name::fileName( ) const { if (m_type == File) return m_rurl.section('/', -1); - return TQString::null; + return TQString(); } TQString Name::directory( ) const { - if ( (m_type == File) && (m_rurl.findRev('/') == -1) ) - return TQString::null; + if ( (m_type == File) && (m_rurl.tqfindRev('/') == -1) ) + return TQString(); - return m_rurl.mid(0, m_rurl.findRev('/')+1); + return m_rurl.mid(0, m_rurl.tqfindRev('/')+1); } bool Name::isFile( ) const @@ -159,7 +159,7 @@ bool Name::isValid( ) const { if (m_rurl.startsWith("/")) return false; - if (m_rurl.contains("//")) + if (m_rurl.tqcontains("//")) return false; if ( (m_rurl.endsWith("/")) && (m_type == File) ) return false; diff --git a/lib/util/rurl.h b/lib/util/rurl.h index 5ab2ec73..09d14b43 100644 --- a/lib/util/rurl.h +++ b/lib/util/rurl.h @@ -41,14 +41,14 @@ public: /**Removes "//" from the name.*/ void cleanRURL(); - /**Returns the extension of a file or TQString::null for directories. + /**Returns the extension of a file or TQString() for directories. If complete is true then returns extensions like "tar.gz". Else returns "gz".*/ TQString extension(bool complete = true) const; - /**Returns the name of the file without the path or TQString::null + /**Returns the name of the file without the path or TQString() for directories.*/ TQString fileName() const; - /**Returns the name of the directory or TQString::null if there are no dirs in path.*/ + /**Returns the name of the directory or TQString() if there are no dirs in path.*/ TQString directory() const; /**Returns true if the type of RName is file.*/ diff --git a/lib/util/settings.cpp b/lib/util/settings.cpp index 129cdd66..9855b06b 100644 --- a/lib/util/settings.cpp +++ b/lib/util/settings.cpp @@ -23,12 +23,12 @@ TQString Settings::terminalEmulatorName( KConfig & config ) if ( useKDESetting ) { - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); - terminal = confGroup.readEntry("TerminalApplication", TQString::fromLatin1("konsole")); + KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); + terminal = confGroup.readEntry("TerminalApplication", TQString::tqfromLatin1("konsole")); } else { - terminal = config.readEntry( "TerminalApplication", TQString::fromLatin1("konsole")); + terminal = config.readEntry( "TerminalApplication", TQString::tqfromLatin1("konsole")); } return terminal; } @@ -46,9 +46,9 @@ TQString Settings::profileByAttributes(const TQString &language, const TQStringL for (TQStringList::const_iterator it = profileKeywords.constBegin(); it != profileKeywords.constEnd(); ++it) { - if (keywords.contains(*it)) + if (keywords.tqcontains(*it)) { - idx = profileKeywords.findIndex(*it); + idx = profileKeywords.tqfindIndex(*it); break; } } diff --git a/lib/util/urlutil.cpp b/lib/util/urlutil.cpp index 849cc555..5f4d2dcd 100644 --- a/lib/util/urlutil.cpp +++ b/lib/util/urlutil.cpp @@ -37,14 +37,14 @@ /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::filename(const TQString & name) { - int slashPos = name.findRev("/"); + int slashPos = name.tqfindRev("/"); return slashPos<0 ? name : name.mid(slashPos+1); } /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::directory(const TQString & name) { - int slashPos = name.findRev("/"); + int slashPos = name.tqfindRev("/"); return slashPos<0 ? TQString("") : name.left(slashPos); } @@ -82,29 +82,29 @@ TQString URLUtil::getRelativePath(const TQString& basepath, const TQString& dest /////////////////////////////////////////////////////////////////////////////// -TQString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slashPolicy) { +TQString URLUtil::relativePath(const KURL & tqparent, const KURL & child, uint slashPolicy) { bool slashPrefix = slashPolicy & SLASH_PREFIX; bool slashSuffix = slashPolicy & SLASH_SUFFIX; - if (parent.equals(child,true)) + if (tqparent.equals(child,true)) return slashPrefix ? TQString("/") : TQString(""); - if (!parent.isParentOf(child)) return TQString(); + if (!tqparent.isParentOf(child)) return TQString(); int a=slashPrefix ? -1 : 1; int b=slashSuffix ? 1 : -1; - return child.path(b).mid(parent.path(a).length()); + return child.path(b).mid(tqparent.path(a).length()); } /////////////////////////////////////////////////////////////////////////////// -TQString URLUtil::relativePath(const TQString & parent, const TQString & child, uint slashPolicy) { - return relativePath(KURL(parent), KURL(child), slashPolicy); +TQString URLUtil::relativePath(const TQString & tqparent, const TQString & child, uint slashPolicy) { + return relativePath(KURL(tqparent), KURL(child), slashPolicy); } /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::upDir(const TQString & path, bool slashSuffix) { - int slashPos = path.findRev("/"); - if (slashPos<1) return TQString::null; + int slashPos = path.tqfindRev("/"); + if (slashPos<1) return TQString(); return path.mid(0,slashPos+ (slashSuffix ? 1 : 0) ); } @@ -132,7 +132,7 @@ KURL URLUtil::mergeURL(const KURL & source, const KURL & dest, const KURL & chil /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::getExtension(const TQString & path) { - int dotPos = path.findRev('.'); + int dotPos = path.tqfindRev('.'); if (dotPos<0) return TQString(""); return path.mid(dotPos+1); } @@ -143,7 +143,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur { TQString absBase = extractPathNameAbsolute( baseDirUrl ), absRef = extractPathNameAbsolute( url ); - int i = absRef.find( absBase, 0, true ); + int i = absRef.tqfind( absBase, 0, true ); if (i == -1) return TQString(); @@ -151,7 +151,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur if (absRef == absBase) return TQString( "." ); else - return absRef.replace( 0, absBase.length(), TQString() ); + return absRef.tqreplace( 0, absBase.length(), TQString() ); } /////////////////////////////////////////////////////////////////////////////// @@ -298,12 +298,12 @@ TQString URLUtil::envExpand ( const TQString& str ) if (len > 1 && str[0] == '$') { - int pos = str.find ('/'); + int pos = str.tqfind ('/'); if (pos < 0) pos = len; - char* ret = getenv( TQConstString(str.unicode()+1, pos-1).string().local8Bit().data() ); + char* ret = getenv( TQConstString(str.tqunicode()+1, pos-1).string().local8Bit().data() ); if (ret) { diff --git a/lib/util/urlutil.h b/lib/util/urlutil.h index e8c84607..39615858 100644 --- a/lib/util/urlutil.h +++ b/lib/util/urlutil.h @@ -50,27 +50,27 @@ namespace URLUtil */ TQString directory(const TQString & pathName); /** - * @return The relative path between a parent and child URL, or blank if the specified - * child is not a child of parent. - * @param parent The parent URL. + * @return The relative path between a tqparent and child URL, or blank if the specified + * child is not a child of tqparent. + * @param tqparent The tqparent URL. * @param child The child URL. - * @param slashPolicy If parent and child are equal then the function returns "/" if + * @param slashPolicy If tqparent and child are equal then the function returns "/" if * slashPolicy contains SLASH_PREFIX and otherwise "".\n"/" is appended to a result * if slashPolicy contains SLASH_SUFFIX.\n"/" is prepended to a result if * slashPolicy contains SLASH_PREFIX. */ - TQString relativePath(const KURL & parent, const KURL & child, uint slashPolicy = SLASH_PREFIX); + TQString relativePath(const KURL & tqparent, const KURL & child, uint slashPolicy = SLASH_PREFIX); /** - * @return The relative path between a parent and child URL, or blank if the specified - * child is not a child of parent. - * @param parent The parent URL. + * @return The relative path between a tqparent and child URL, or blank if the specified + * child is not a child of tqparent. + * @param tqparent The tqparent URL. * @param child The child URL. - * @param slashPolicy If parent and child are equal then the function returns "/" if + * @param slashPolicy If tqparent and child are equal then the function returns "/" if * slashPolicy contains SLASH_PREFIX and otherwise "".\n"/" is appended to a result * if slashPolicy contains SLASH_SUFFIX.\n"/" is prepended to a result if * slashPolicy contains SLASH_PREFIX. */ - TQString relativePath(const TQString & parent, const TQString & child, uint slashPolicy = SLASH_PREFIX); + TQString relativePath(const TQString & tqparent, const TQString & child, uint slashPolicy = SLASH_PREFIX); /** * @return The relative path between a base path and destination path or. * @param base The base Path. @@ -133,7 +133,7 @@ namespace URLUtil TQString extractPathNameRelative(const KURL &baseDirUrl, const KURL &url ); /**Same as above. @p basePath is TQString.*/ TQString extractPathNameRelative(const TQString &basePath, const KURL &url ); - /**Same as above. Both @p basePath and @p absFilePath are QStrings.*/ + /**Same as above. Both @p basePath and @p absFilePath are TQStrings.*/ TQString extractPathNameRelative(const TQString &basePath, const TQString &absFilePath ); /** @@ -167,10 +167,10 @@ namespace URLUtil * @param urls URLs to dump. * @param aMessage Message to be written onto a stdout. */ - void dump( const KURL::List &urls, const TQString &aMessage = TQString::null ); + void dump( const KURL::List &urls, const TQString &aMessage = TQString() ); /** - * Same as TQDir::canonicalPath in later versions of Qt. Earlier versions of Qt + * Same as TQDir::canonicalPath in later versions of TQt. Earlier versions of TQt * had this broken, so it's reproduced here. * Deprecated, use TQDir::canonicalPath instead. */ |