diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
1872 files changed, 46257 insertions, 46257 deletions
diff --git a/drkonqi/backtrace.cpp b/drkonqi/backtrace.cpp index 1bf48a4c1..8607c5b75 100644 --- a/drkonqi/backtrace.cpp +++ b/drkonqi/backtrace.cpp @@ -25,8 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************/ -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> #include <kprocess.h> #include <kdebug.h> @@ -39,9 +39,9 @@ #include "backtrace.h" #include "backtrace.moc" -BackTrace::BackTrace(const KrashConfig *krashconf, QObject *parent, +BackTrace::BackTrace(const KrashConfig *krashconf, TQObject *parent, const char *name) - : QObject(parent, name), + : TQObject(parent, name), m_krashconf(krashconf), m_temp(0) { m_proc = new KProcess; @@ -68,25 +68,25 @@ BackTrace::~BackTrace() void BackTrace::start() { - QString exec = m_krashconf->tryExec(); + TQString exec = m_krashconf->tryExec(); if ( !exec.isEmpty() && KStandardDirs::findExe(exec).isEmpty() ) { - QObject * o = parent(); + TQObject * o = parent(); - if (o && !o->inherits("QWidget")) + if (o && !o->inherits("TQWidget")) { o = NULL; } KMessageBox::error( - (QWidget *)o, + (TQWidget *)o, i18n("Could not generate a backtrace as the debugger '%1' was not found.").arg(exec)); return; } m_temp = new KTempFile; m_temp->setAutoDelete(TRUE); int handle = m_temp->handle(); - QString backtraceCommand = m_krashconf->backtraceCommand(); + TQString backtraceCommand = m_krashconf->backtraceCommand(); const char* bt = backtraceCommand.latin1(); ::write(handle, bt, strlen(bt)); // the command for a backtrace ::write(handle, "\n", 1); @@ -96,22 +96,22 @@ void BackTrace::start() m_proc = new KProcess; m_proc->setUseShell(true); - QString str = m_krashconf->debuggerBatch(); + TQString str = m_krashconf->debuggerBatch(); m_krashconf->expandString(str, true, m_temp->name()); *m_proc << str; - connect(m_proc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReadInput(KProcess*, char*, int))); - connect(m_proc, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited(KProcess*))); + connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReadInput(KProcess*, char*, int))); + connect(m_proc, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited(KProcess*))); m_proc->start ( KProcess::NotifyOnExit, KProcess::All ); } void BackTrace::slotReadInput(KProcess *, char* buf, int buflen) { - QString newstr = QString::fromLocal8Bit(buf, buflen); + TQString newstr = TQString::fromLocal8Bit(buf, buflen); m_strBt.append(newstr); emit append(newstr); @@ -137,25 +137,25 @@ bool BackTrace::usefulBacktrace() { // remove crap if( !m_krashconf->removeFromBacktraceRegExp().isEmpty()) - m_strBt.replace(QRegExp( m_krashconf->removeFromBacktraceRegExp()), QString::null); + m_strBt.replace(TQRegExp( m_krashconf->removeFromBacktraceRegExp()), TQString::null); if( m_krashconf->disableChecks()) return true; // prepend and append newline, so that regexps like '\nwhatever\n' work on all lines - QString strBt = '\n' + m_strBt + '\n'; + TQString strBt = '\n' + m_strBt + '\n'; // how many " ?? " in the bt ? int unknown = 0; if( !m_krashconf->invalidStackFrameRegExp().isEmpty()) - unknown = strBt.contains( QRegExp( m_krashconf->invalidStackFrameRegExp())); + unknown = strBt.contains( TQRegExp( m_krashconf->invalidStackFrameRegExp())); // how many stack frames in the bt ? int frames = 0; if( !m_krashconf->frameRegExp().isEmpty()) - frames = strBt.contains( QRegExp( m_krashconf->frameRegExp())); + frames = strBt.contains( TQRegExp( m_krashconf->frameRegExp())); else frames = strBt.contains('\n'); bool tooShort = false; if( !m_krashconf->neededInValidBacktraceRegExp().isEmpty()) - tooShort = ( strBt.find( QRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 ); + tooShort = ( strBt.find( TQRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 ); return !m_strBt.isNull() && !tooShort && (unknown < frames); } @@ -164,7 +164,7 @@ void BackTrace::processBacktrace() { if( !m_krashconf->kcrashRegExp().isEmpty()) { - QRegExp kcrashregexp( m_krashconf->kcrashRegExp()); + TQRegExp kcrashregexp( m_krashconf->kcrashRegExp()); int pos = kcrashregexp.search( m_strBt ); if( pos >= 0 ) { @@ -175,7 +175,7 @@ void BackTrace::processBacktrace() --len; } m_strBt.remove( pos, len ); - m_strBt.insert( pos, QString::fromLatin1( "[KCrash handler]\n" )); + m_strBt.insert( pos, TQString::fromLatin1( "[KCrash handler]\n" )); } } } diff --git a/drkonqi/backtrace.h b/drkonqi/backtrace.h index 861548f69..b6779f3eb 100644 --- a/drkonqi/backtrace.h +++ b/drkonqi/backtrace.h @@ -32,24 +32,24 @@ class KProcess; class KrashConfig; class KTempFile; -#include <qobject.h> +#include <tqobject.h> class BackTrace : public QObject { Q_OBJECT public: - BackTrace(const KrashConfig *krashconf, QObject *parent, + BackTrace(const KrashConfig *krashconf, TQObject *parent, const char *name = 0); ~BackTrace(); void start(); signals: - void append(const QString &str); // Just the new text + void append(const TQString &str); // Just the new text void someError(); - void done(const QString &); // replaces whole text + void done(const TQString &); // replaces whole text protected slots: void slotProcessExited(KProcess * proc); @@ -61,6 +61,6 @@ private: KProcess *m_proc; const KrashConfig *m_krashconf; KTempFile *m_temp; - QString m_strBt; + TQString m_strBt; }; #endif diff --git a/drkonqi/crashtest.cpp b/drkonqi/crashtest.cpp index 8d41e6325..a00fae6b0 100644 --- a/drkonqi/crashtest.cpp +++ b/drkonqi/crashtest.cpp @@ -17,7 +17,7 @@ enum CrashType { Crash, Malloc, Div0, Assert }; void do_crash() { KCmdLineArgs *args = 0; - QCString type = args->arg(0); + TQCString type = args->arg(0); printf("result = %s\n", type.data()); } @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) KApplication app(false, false); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QCString type = args->count() ? args->arg(0) : ""; + TQCString type = args->count() ? args->arg(0) : ""; int crashtype = Crash; if (type == "malloc") crashtype = Malloc; diff --git a/drkonqi/debugger.cpp b/drkonqi/debugger.cpp index 95ec6c9ba..c6b073e4f 100644 --- a/drkonqi/debugger.cpp +++ b/drkonqi/debugger.cpp @@ -25,9 +25,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************/ -#include <qlayout.h> -#include <qhbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqlabel.h> #include <kdialog.h> #include <klocale.h> @@ -45,29 +45,29 @@ #include "debugger.h" #include "debugger.moc" -KrashDebugger :: KrashDebugger (const KrashConfig *krashconf, QWidget *parent, const char *name) - : QWidget( parent, name ), +KrashDebugger :: KrashDebugger (const KrashConfig *krashconf, TQWidget *parent, const char *name) + : TQWidget( parent, name ), m_krashconf(krashconf), m_proctrace(0) { - QVBoxLayout *vbox = new QVBoxLayout( this, 0, KDialog::marginHint() ); + TQVBoxLayout *vbox = new TQVBoxLayout( this, 0, KDialog::marginHint() ); vbox->setAutoAdd(TRUE); m_backtrace = new KTextBrowser(this); m_backtrace->setTextFormat(Qt::PlainText); m_backtrace->setFont(KGlobalSettings::fixedFont()); - QWidget *w = new QWidget( this ); - ( new QHBoxLayout( w, 0, KDialog::marginHint() ) )->setAutoAdd( true ); - m_status = new QLabel( w ); - m_status->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) ); + TQWidget *w = new TQWidget( this ); + ( new TQHBoxLayout( w, 0, KDialog::marginHint() ) )->setAutoAdd( true ); + m_status = new TQLabel( w ); + m_status->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) ); //m_copyButton = new KPushButton( KStdGuiItem::copy(), w ); - KGuiItem item( i18n( "C&opy" ), QString::fromLatin1( "editcopy" ) ); + KGuiItem item( i18n( "C&opy" ), TQString::fromLatin1( "editcopy" ) ); m_copyButton = new KPushButton( item, w ); - connect( m_copyButton, SIGNAL( clicked() ), this, SLOT( slotCopy() ) ); + connect( m_copyButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopy() ) ); m_copyButton->setEnabled( false ); m_saveButton = new KPushButton( m_krashconf->safeMode() ? KStdGuiItem::save() : KStdGuiItem::saveAs(), w ); - connect( m_saveButton, SIGNAL( clicked() ), this, SLOT( slotSave() ) ); + connect( m_saveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSave() ) ); m_saveButton->setEnabled( false ); } @@ -77,7 +77,7 @@ KrashDebugger :: ~KrashDebugger() // delete m_proctrace; } -void KrashDebugger :: slotDone(const QString& str) +void KrashDebugger :: slotDone(const TQString& str) { m_status->setText(i18n("Done.")); m_copyButton->setEnabled( true ); @@ -95,7 +95,7 @@ void KrashDebugger :: slotSave() { if (m_krashconf->safeMode()) { - KTempFile tf(QString::fromAscii("/tmp/"), QString::fromAscii(".kcrash"), 0600); + KTempFile tf(TQString::fromAscii("/tmp/"), TQString::fromAscii(".kcrash"), 0600); if (!tf.status()) { *tf.textStream() << m_backtrace->text(); @@ -109,13 +109,13 @@ void KrashDebugger :: slotSave() } else { - QString defname = m_krashconf->execName() + QString::fromLatin1( ".kcrash" ); + TQString defname = m_krashconf->execName() + TQString::fromLatin1( ".kcrash" ); if( defname.contains( '/' )) defname = defname.mid( defname.findRev( '/' ) + 1 ); - QString filename = KFileDialog::getSaveFileName(defname, QString::null, this, i18n("Select Filename")); + TQString filename = KFileDialog::getSaveFileName(defname, TQString::null, this, i18n("Select Filename")); if (!filename.isEmpty()) { - QFile f(filename); + TQFile f(filename); if (f.exists()) { if (KMessageBox::Cancel == @@ -129,7 +129,7 @@ void KrashDebugger :: slotSave() if (f.open(IO_WriteOnly)) { - QTextStream ts(&f); + TQTextStream ts(&f); ts << m_backtrace->text(); f.close(); } @@ -151,7 +151,7 @@ void KrashDebugger :: slotSomeError() + m_backtrace->text()); } -void KrashDebugger :: slotAppend(const QString &str) +void KrashDebugger :: slotAppend(const TQString &str) { m_status->setText(i18n("Loading backtrace...")); @@ -159,9 +159,9 @@ void KrashDebugger :: slotAppend(const QString &str) m_backtrace->setText(m_backtrace->text() + str); } -void KrashDebugger :: showEvent(QShowEvent *e) +void KrashDebugger :: showEvent(TQShowEvent *e) { - QWidget::showEvent(e); + TQWidget::showEvent(e); startDebugger(); } @@ -171,7 +171,7 @@ void KrashDebugger :: startDebugger() if (m_proctrace || !m_backtrace->text().isEmpty()) return; - QString msg; + TQString msg; bool checks = performChecks( &msg ); if( !checks && !m_krashconf->disableChecks()) { @@ -195,20 +195,20 @@ void KrashDebugger :: startDebugger() m_proctrace = new BackTrace(m_krashconf, this); - connect(m_proctrace, SIGNAL(append(const QString &)), - SLOT(slotAppend(const QString &))); - connect(m_proctrace, SIGNAL(done(const QString&)), SLOT(slotDone(const QString&))); - connect(m_proctrace, SIGNAL(someError()), SLOT(slotSomeError())); + connect(m_proctrace, TQT_SIGNAL(append(const TQString &)), + TQT_SLOT(slotAppend(const TQString &))); + connect(m_proctrace, TQT_SIGNAL(done(const TQString&)), TQT_SLOT(slotDone(const TQString&))); + connect(m_proctrace, TQT_SIGNAL(someError()), TQT_SLOT(slotSomeError())); m_proctrace->start(); } // this function check for "dangerous" settings, returns false // and message in case some of them are activated -bool KrashDebugger::performChecks( QString* msg ) +bool KrashDebugger::performChecks( TQString* msg ) { bool ret = true; - KConfig kdedcfg( QString::fromLatin1( "kdedrc" ), true ); + KConfig kdedcfg( TQString::fromLatin1( "kdedrc" ), true ); kdedcfg.setGroup( "General" ); if( kdedcfg.readBoolEntry( "DelayedCheck", false )) { diff --git a/drkonqi/debugger.h b/drkonqi/debugger.h index ba1d87385..88f309284 100644 --- a/drkonqi/debugger.h +++ b/drkonqi/debugger.h @@ -34,26 +34,26 @@ class KrashConfig; class KTextBrowser; class BackTrace; -#include <qwidget.h> +#include <tqwidget.h> class KrashDebugger : public QWidget { Q_OBJECT public: - KrashDebugger(const KrashConfig *krashconf, QWidget *parent = 0, const char *name = 0); + KrashDebugger(const KrashConfig *krashconf, TQWidget *parent = 0, const char *name = 0); ~KrashDebugger(); public slots: - void slotAppend(const QString &); - void slotDone(const QString&); + void slotAppend(const TQString &); + void slotDone(const TQString&); void slotSomeError(); protected: void startDebugger(); - bool performChecks( QString* msg ); + bool performChecks( TQString* msg ); - virtual void showEvent(QShowEvent *e); + virtual void showEvent(TQShowEvent *e); protected slots: void slotCopy(); @@ -62,11 +62,11 @@ protected slots: private: const KrashConfig *m_krashconf; BackTrace *m_proctrace; - QLabel *m_status; + TQLabel *m_status; KTextBrowser *m_backtrace; - QPushButton * m_copyButton; - QPushButton * m_saveButton; - QString m_prependText; + TQPushButton * m_copyButton; + TQPushButton * m_saveButton; + TQString m_prependText; }; #endif diff --git a/drkonqi/drbugreport.cpp b/drkonqi/drbugreport.cpp index 48ef71a3f..3ec731b01 100644 --- a/drkonqi/drbugreport.cpp +++ b/drkonqi/drbugreport.cpp @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************/ -#include <qmultilineedit.h> +#include <tqmultilineedit.h> #include <kmessagebox.h> #include <klocale.h> @@ -34,13 +34,13 @@ #include "drbugreport.moc" #include "drbugreport.h" -DrKBugReport::DrKBugReport(QWidget *parent, bool modal, +DrKBugReport::DrKBugReport(TQWidget *parent, bool modal, const KAboutData *aboutData) : KBugReport(parent, modal, aboutData) { } -void DrKBugReport::setText(const QString &str) +void DrKBugReport::setText(const TQString &str) { m_lineedit->setText(str); m_startstring = str.simplifyWhiteSpace(); @@ -51,7 +51,7 @@ void DrKBugReport::slotOk() if (!m_startstring.isEmpty() && m_lineedit->text().simplifyWhiteSpace() == m_startstring) { - QString msg = i18n("You have to edit the description " + TQString msg = i18n("You have to edit the description " "before the report can be sent."); KMessageBox::error(this, msg); return; diff --git a/drkonqi/drbugreport.h b/drkonqi/drbugreport.h index f2209ec23..d1e98e028 100644 --- a/drkonqi/drbugreport.h +++ b/drkonqi/drbugreport.h @@ -40,14 +40,14 @@ public: /** * Constructor. */ - DrKBugReport(QWidget *parent = 0, bool modal = true, + DrKBugReport(TQWidget *parent = 0, bool modal = true, const KAboutData *aboutData = 0); public: /** * Allows the debugger to set the default text in the editor. */ - void setText(const QString &str); + void setText(const TQString &str); protected slots: /** @@ -56,7 +56,7 @@ protected slots: virtual void slotOk( void ); private: - QString m_startstring; + TQString m_startstring; }; #endif diff --git a/drkonqi/krashconf.cpp b/drkonqi/krashconf.cpp index 62c5b2215..4faccc956 100644 --- a/drkonqi/krashconf.cpp +++ b/drkonqi/krashconf.cpp @@ -48,7 +48,7 @@ KrashConfig :: ~KrashConfig() delete m_aboutData; } -ASYNC KrashConfig :: registerDebuggingApplication(const QString& launchName) +ASYNC KrashConfig :: registerDebuggingApplication(const TQString& launchName) { emit newDebuggingApplication( launchName ); } @@ -69,7 +69,7 @@ void KrashConfig :: readConfig() if ( !args->getOption( "apppath" ).isEmpty() ) m_execname.prepend( args->getOption( "apppath" ) + '/' ); - QCString programname = args->getOption("programname"); + TQCString programname = args->getOption("programname"); if (programname.isEmpty()) programname.setStr(I18N_NOOP("unknown")); // leak some memory... Well. It's only done once anyway :-) @@ -80,7 +80,7 @@ void KrashConfig :: readConfig() 0, 0, 0, 0, 0, args->getOption("bugaddress")); - QCString startup_id( args->getOption( "startupid" )); + TQCString startup_id( args->getOption( "startupid" )); if (!startup_id.isEmpty()) { // stop startup notification KStartupInfoId id; @@ -92,13 +92,13 @@ void KrashConfig :: readConfig() config->setGroup("drkonqi"); // maybe we should check if it's relative? - QString configname = config->readEntry("ConfigName", - QString::fromLatin1("enduser")); + TQString configname = config->readEntry("ConfigName", + TQString::fromLatin1("enduser")); - QString debuggername = config->readEntry("Debugger", - QString::fromLatin1("gdb")); + TQString debuggername = config->readEntry("Debugger", + TQString::fromLatin1("gdb")); - KConfig debuggers(QString::fromLatin1("debuggers/%1rc").arg(debuggername), + KConfig debuggers(TQString::fromLatin1("debuggers/%1rc").arg(debuggername), true, false, "appdata"); debuggers.setGroup("General"); @@ -112,7 +112,7 @@ void KrashConfig :: readConfig() m_neededInValidBacktraceRegExp = debuggers.readEntry("NeededInValidBacktraceRegExp"); m_kcrashRegExp = debuggers.readEntry("KCrashRegExp"); - KConfig preset(QString::fromLatin1("presets/%1rc").arg(configname), + KConfig preset(TQString::fromLatin1("presets/%1rc").arg(configname), true, false, "appdata"); preset.setGroup("ErrorDescription"); @@ -135,10 +135,10 @@ void KrashConfig :: readConfig() bool b = preset.readBoolEntry("SignalDetails", true); - QString str = QString::number(m_signalnum); + TQString str = TQString::number(m_signalnum); // use group unknown if signal not found if (!preset.hasGroup(str)) - str = QString::fromLatin1("unknown"); + str = TQString::fromLatin1("unknown"); preset.setGroup(str); m_signalName = preset.readEntry("Name"); if (b) @@ -146,16 +146,16 @@ void KrashConfig :: readConfig() } // replace some of the strings -void KrashConfig :: expandString(QString &str, bool shell, const QString &tempFile) const +void KrashConfig :: expandString(TQString &str, bool shell, const TQString &tempFile) const { - QMap<QString,QString> map; - map[QString::fromLatin1("appname")] = QString::fromLatin1(appName()); - map[QString::fromLatin1("execname")] = startedByKdeinit() ? QString::fromLatin1("kdeinit") : m_execname; - map[QString::fromLatin1("signum")] = QString::number(signalNumber()); - map[QString::fromLatin1("signame")] = signalName(); - map[QString::fromLatin1("progname")] = programName(); - map[QString::fromLatin1("pid")] = QString::number(pid()); - map[QString::fromLatin1("tempfile")] = tempFile; + TQMap<TQString,TQString> map; + map[TQString::fromLatin1("appname")] = TQString::fromLatin1(appName()); + map[TQString::fromLatin1("execname")] = startedByKdeinit() ? TQString::fromLatin1("kdeinit") : m_execname; + map[TQString::fromLatin1("signum")] = TQString::number(signalNumber()); + map[TQString::fromLatin1("signame")] = signalName(); + map[TQString::fromLatin1("progname")] = programName(); + map[TQString::fromLatin1("pid")] = TQString::number(pid()); + map[TQString::fromLatin1("tempfile")] = tempFile; if (shell) str = KMacroExpander::expandMacrosShellQuote( str, map ); else diff --git a/drkonqi/krashconf.h b/drkonqi/krashconf.h index 5349b7165..236083f76 100644 --- a/drkonqi/krashconf.h +++ b/drkonqi/krashconf.h @@ -29,12 +29,12 @@ #define KRASHCONF_H #include <kaboutdata.h> -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> #include "krashdcopinterface.h" -class KrashConfig : public QObject, public KrashDCOPInterface +class KrashConfig : public TQObject, public KrashDCOPInterface { Q_OBJECT @@ -43,42 +43,42 @@ public: virtual ~KrashConfig(); k_dcop: - virtual QString programName() const { return m_aboutData->programName(); }; - virtual QCString appName() const { return m_aboutData->appName(); }; + virtual TQString programName() const { return m_aboutData->programName(); }; + virtual TQCString appName() const { return m_aboutData->appName(); }; virtual int signalNumber() const { return m_signalnum; }; virtual int pid() const { return m_pid; }; virtual bool startedByKdeinit() const { return m_startedByKdeinit; }; virtual bool safeMode() const { return m_safeMode; }; - virtual QString signalName() const { return m_signalName; }; - virtual QString signalText() const { return m_signalText; }; - virtual QString whatToDoText() const { return m_whatToDoText; } - virtual QString errorDescriptionText() const { return m_errorDescriptionText; }; + virtual TQString signalName() const { return m_signalName; }; + virtual TQString signalText() const { return m_signalText; }; + virtual TQString whatToDoText() const { return m_whatToDoText; } + virtual TQString errorDescriptionText() const { return m_errorDescriptionText; }; - virtual ASYNC registerDebuggingApplication(const QString& launchName); + virtual ASYNC registerDebuggingApplication(const TQString& launchName); public: - QString debugger() const { return m_debugger; } - QString debuggerBatch() const { return m_debuggerBatch; } - QString tryExec() const { return m_tryExec; } - QString backtraceCommand() const { return m_backtraceCommand; } - QString removeFromBacktraceRegExp() const { return m_removeFromBacktraceRegExp; } - QString invalidStackFrameRegExp() const { return m_invalidStackFrameRegExp; } - QString frameRegExp() const { return m_frameRegExp; } - QString neededInValidBacktraceRegExp() const { return m_neededInValidBacktraceRegExp; } - QString kcrashRegExp() const { return m_kcrashRegExp; } + TQString debugger() const { return m_debugger; } + TQString debuggerBatch() const { return m_debuggerBatch; } + TQString tryExec() const { return m_tryExec; } + TQString backtraceCommand() const { return m_backtraceCommand; } + TQString removeFromBacktraceRegExp() const { return m_removeFromBacktraceRegExp; } + TQString invalidStackFrameRegExp() const { return m_invalidStackFrameRegExp; } + TQString frameRegExp() const { return m_frameRegExp; } + TQString neededInValidBacktraceRegExp() const { return m_neededInValidBacktraceRegExp; } + TQString kcrashRegExp() const { return m_kcrashRegExp; } bool showBacktrace() const { return m_showbacktrace; }; bool showDebugger() const { return m_showdebugger && !m_debugger.isNull(); }; bool showBugReport() const { return m_showbugreport; }; bool disableChecks() const { return m_disablechecks; }; const KAboutData *aboutData() const { return m_aboutData; } - QString execName() const { return m_execname; } + TQString execName() const { return m_execname; } - void expandString(QString &str, bool shell, const QString &tempFile = QString::null) const; + void expandString(TQString &str, bool shell, const TQString &tempFile = TQString::null) const; void acceptDebuggingApp(); signals: - void newDebuggingApplication(const QString& launchName); + void newDebuggingApplication(const TQString& launchName); private: void readConfig(); @@ -93,21 +93,21 @@ private: bool m_startedByKdeinit; bool m_safeMode; bool m_disablechecks; - QString m_signalName; - QString m_signalText; - QString m_whatToDoText; - QString m_errorDescriptionText; - QString m_execname; + TQString m_signalName; + TQString m_signalText; + TQString m_whatToDoText; + TQString m_errorDescriptionText; + TQString m_execname; - QString m_debugger; - QString m_debuggerBatch; - QString m_tryExec; - QString m_backtraceCommand; - QString m_removeFromBacktraceRegExp; - QString m_invalidStackFrameRegExp; - QString m_frameRegExp; - QString m_neededInValidBacktraceRegExp; - QString m_kcrashRegExp; + TQString m_debugger; + TQString m_debuggerBatch; + TQString m_tryExec; + TQString m_backtraceCommand; + TQString m_removeFromBacktraceRegExp; + TQString m_invalidStackFrameRegExp; + TQString m_frameRegExp; + TQString m_neededInValidBacktraceRegExp; + TQString m_kcrashRegExp; }; #endif diff --git a/drkonqi/krashdcopinterface.h b/drkonqi/krashdcopinterface.h index bf5f1a169..176756bf7 100644 --- a/drkonqi/krashdcopinterface.h +++ b/drkonqi/krashdcopinterface.h @@ -32,8 +32,8 @@ #include <dcopobject.h> -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include <kaboutdata.h> /** @@ -47,18 +47,18 @@ class KrashDCOPInterface : virtual public DCOPObject public: k_dcop: - virtual QString programName() const = 0; - virtual QCString appName() const = 0; + virtual TQString programName() const = 0; + virtual TQCString appName() const = 0; virtual int signalNumber() const = 0; virtual int pid() const = 0; virtual bool startedByKdeinit() const = 0; virtual bool safeMode() const = 0; - virtual QString signalName() const = 0; - virtual QString signalText() const = 0; - virtual QString whatToDoText() const = 0; - virtual QString errorDescriptionText() const = 0; + virtual TQString signalName() const = 0; + virtual TQString signalText() const = 0; + virtual TQString whatToDoText() const = 0; + virtual TQString errorDescriptionText() const = 0; - virtual ASYNC registerDebuggingApplication(const QString& launchName) = 0; + virtual ASYNC registerDebuggingApplication(const TQString& launchName) = 0; k_dcop_signals: void acceptDebuggingApplication(); diff --git a/drkonqi/toplevel.cpp b/drkonqi/toplevel.cpp index a691b30c5..488edaebd 100644 --- a/drkonqi/toplevel.cpp +++ b/drkonqi/toplevel.cpp @@ -25,9 +25,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************/ -#include <qstring.h> -#include <qlabel.h> -#include <qhbox.h> +#include <tqstring.h> +#include <tqlabel.h> +#include <tqhbox.h> #include "netwm.h" @@ -47,7 +47,7 @@ #include "toplevel.h" #include "toplevel.moc" -Toplevel :: Toplevel(KrashConfig *krashconf, QWidget *parent, const char *name) +Toplevel :: Toplevel(KrashConfig *krashconf, TQWidget *parent, const char *name) : KDialogBase( Tabbed, krashconf->programName(), User3 | User2 | User1 | Close, @@ -61,17 +61,17 @@ Toplevel :: Toplevel(KrashConfig *krashconf, QWidget *parent, const char *name) ), m_krashconf(krashconf), m_bugreport(0) { - QHBox *page = addHBoxPage(i18n("&General")); + TQHBox *page = addHBoxPage(i18n("&General")); page->setSpacing(20); // picture of konqi - QLabel *lab = new QLabel(page); - lab->setFrameStyle(QFrame::Panel | QFrame::Sunken); - QPixmap pix(locate("appdata", QString::fromLatin1("pics/konqi.png"))); + TQLabel *lab = new TQLabel(page); + lab->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); + TQPixmap pix(locate("appdata", TQString::fromLatin1("pics/konqi.png"))); lab->setPixmap(pix); lab->setFixedSize( lab->sizeHint() ); - QLabel * info = new QLabel(generateText(), page); + TQLabel * info = new TQLabel(generateText(), page); info->setMinimumSize(info->sizeHint()); if (m_krashconf->showBacktrace()) @@ -84,8 +84,8 @@ Toplevel :: Toplevel(KrashConfig *krashconf, QWidget *parent, const char *name) showButton( User2, m_krashconf->showDebugger() ); showButton( User3, false ); - connect(this, SIGNAL(closeClicked()), SLOT(accept())); - connect(m_krashconf, SIGNAL(newDebuggingApplication(const QString&)), SLOT(slotNewDebuggingApp(const QString&))); + connect(this, TQT_SIGNAL(closeClicked()), TQT_SLOT(accept())); + connect(m_krashconf, TQT_SIGNAL(newDebuggingApplication(const TQString&)), TQT_SLOT(slotNewDebuggingApp(const TQString&))); if ( !m_krashconf->safeMode() && kapp->dcopClient()->attach() ) kapp->dcopClient()->registerAs( kapp->name() ); @@ -95,9 +95,9 @@ Toplevel :: ~Toplevel() { } -QString Toplevel :: generateText() const +TQString Toplevel :: generateText() const { - QString str; + TQString str; if (!m_krashconf->errorDescriptionText().isEmpty()) str += i18n("<p><b>Short description</b></p><p>%1</p>") @@ -151,13 +151,13 @@ void Toplevel :: slotUser1() m_bugreport = new DrKBugReport(0, true, m_krashconf->aboutData()); if (i == KMessageBox::Yes) { - QApplication::setOverrideCursor ( waitCursor ); + TQApplication::setOverrideCursor ( waitCursor ); // generate the backtrace BackTrace *backtrace = new BackTrace(m_krashconf, this); - connect(backtrace, SIGNAL(someError()), SLOT(slotBacktraceSomeError())); - connect(backtrace, SIGNAL(done(const QString &)), - SLOT(slotBacktraceDone(const QString &))); + connect(backtrace, TQT_SIGNAL(someError()), TQT_SLOT(slotBacktraceSomeError())); + connect(backtrace, TQT_SIGNAL(done(const TQString &)), + TQT_SLOT(slotBacktraceDone(const TQString &))); backtrace->start(); @@ -173,7 +173,7 @@ void Toplevel :: slotUser1() void Toplevel :: slotUser2() { - QString str = m_krashconf->debugger(); + TQString str = m_krashconf->debugger(); m_krashconf->expandString(str, true); KProcess proc; @@ -182,7 +182,7 @@ void Toplevel :: slotUser2() proc.start(KProcess::DontCare); } -void Toplevel :: slotNewDebuggingApp(const QString& launchName) +void Toplevel :: slotNewDebuggingApp(const TQString& launchName) { setButtonText( User3, launchName ); showButton( User3, true ); @@ -193,15 +193,15 @@ void Toplevel :: slotUser3() m_krashconf->acceptDebuggingApp(); } -void Toplevel :: slotBacktraceDone(const QString &str) +void Toplevel :: slotBacktraceDone(const TQString &str) { // Do not translate.. This will be included in the _MAIL_. - QString buf = QString::fromLatin1 + TQString buf = TQString::fromLatin1 ("\n\n\nHere is a backtrace generated by DrKonqi:\n") + str; m_bugreport->setText(buf); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_bugreport->exec(); delete m_bugreport; @@ -210,7 +210,7 @@ void Toplevel :: slotBacktraceDone(const QString &str) void Toplevel :: slotBacktraceSomeError() { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::sorry(0, i18n("It was not possible to generate a backtrace."), i18n("Backtrace Not Possible")); diff --git a/drkonqi/toplevel.h b/drkonqi/toplevel.h index 6476ac3d4..e6854bab5 100644 --- a/drkonqi/toplevel.h +++ b/drkonqi/toplevel.h @@ -41,22 +41,22 @@ class Toplevel : public KDialogBase Q_OBJECT public: - Toplevel(KrashConfig *krash, QWidget *parent = 0, const char * name = 0); + Toplevel(KrashConfig *krash, TQWidget *parent = 0, const char * name = 0); ~Toplevel(); private: // helper methods - QString generateText() const; + TQString generateText() const; protected slots: void slotUser1(); void slotUser2(); - void slotNewDebuggingApp(const QString& launchName); + void slotNewDebuggingApp(const TQString& launchName); void slotUser3(); protected slots: void slotBacktraceSomeError(); - void slotBacktraceDone(const QString &); + void slotBacktraceDone(const TQString &); private: KrashConfig *m_krashconf; diff --git a/kappfinder/common.cpp b/kappfinder/common.cpp index c6cd95a65..71ae2319e 100644 --- a/kappfinder/common.cpp +++ b/kappfinder/common.cpp @@ -24,8 +24,8 @@ #include <kglobal.h> #include <kstandarddirs.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> #include <stdlib.h> @@ -33,11 +33,11 @@ #define DBG_CODE 1213 -void copyFile( const QString &inFileName, const QString &outFileName ) +void copyFile( const TQString &inFileName, const TQString &outFileName ) { - QFile inFile( inFileName ); + TQFile inFile( inFileName ); if ( inFile.open( IO_ReadOnly ) ) { - QFile outFile( outFileName ); + TQFile outFile( outFileName ); if ( outFile.open( IO_WriteOnly ) ) { outFile.writeBlock( inFile.readAll() ); outFile.close(); @@ -47,13 +47,13 @@ void copyFile( const QString &inFileName, const QString &outFileName ) } } -bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ, - QString destDir ) +bool scanDesktopFile( TQPtrList<AppLnkCache> &appCache, const TQString &templ, + TQString destDir ) { KDesktopFile desktop( templ, true ); // find out where to put the .desktop files - QString destName; + TQString destName; if ( destDir.isNull() ) destDir = KGlobal::dirs()->saveLocation( "apps" ); else @@ -74,7 +74,7 @@ bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ, } // determine for which executable to look - QString exec = desktop.readPathEntry( "TryExec" ); + TQString exec = desktop.readPathEntry( "TryExec" ); if ( exec.isEmpty() ) exec = desktop.readPathEntry( "Exec" ); pos = exec.find( ' ' ); @@ -82,8 +82,8 @@ bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ, exec = exec.left( pos ); // try to locate the binary - QString pexec = KGlobal::dirs()->findExe( exec, - QString( ::getenv( "PATH" ) ) + ":/usr/X11R6/bin:/usr/games" ); + TQString pexec = KGlobal::dirs()->findExe( exec, + TQString( ::getenv( "PATH" ) ) + ":/usr/X11R6/bin:/usr/games" ); if ( pexec.isEmpty() ) { kdDebug(DBG_CODE) << "looking for " << exec.local8Bit() << "\t\tnot found" << endl; @@ -103,22 +103,22 @@ bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ, return true; } -void createDesktopFiles( QPtrList<AppLnkCache> &appCache, int &added ) +void createDesktopFiles( TQPtrList<AppLnkCache> &appCache, int &added ) { AppLnkCache* cache; for ( cache = appCache.first(); cache; cache = appCache.next() ) { if ( cache->item == 0 || ( cache->item && cache->item->isOn() ) ) { added++; - QString destDir = cache->destDir; - QString destName = cache->destName; - QString templ = cache->templ; + TQString destDir = cache->destDir; + TQString destName = cache->destName; + TQString templ = cache->templ; destDir += "/"; - QDir d; + TQDir d; int pos = -1; while ( ( pos = destDir.find( '/', pos + 1 ) ) >= 0 ) { - QString path = destDir.left( pos + 1 ); + TQString path = destDir.left( pos + 1 ); d = path; if ( !d.exists() ) d.mkdir( path ); @@ -130,7 +130,7 @@ void createDesktopFiles( QPtrList<AppLnkCache> &appCache, int &added ) } } -void decorateDirs( QString destDir ) +void decorateDirs( TQString destDir ) { // find out where to put the .directory files if ( destDir.isNull() ) @@ -138,19 +138,19 @@ void decorateDirs( QString destDir ) else destDir += "/"; - QStringList dirs = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true ); + TQStringList dirs = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true ); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = dirs.begin(); it != dirs.end(); ++it ) { // find out the name of the file to store - QString destName = *it; + TQString destName = *it; int pos = destName.find( "kappfinder/apps/" ); if ( pos > 0 ) destName = destName.mid( pos + strlen( "kappfinder/apps/" ) ); destName = destDir + "/" + destName; - if ( !QFile::exists( destName ) ) { + if ( !TQFile::exists( destName ) ) { kdDebug(DBG_CODE) << "Copy " << *it << " to " << destName << endl; copyFile( *it, destName ); } diff --git a/kappfinder/common.h b/kappfinder/common.h index 699b9dfdc..f18139b3c 100644 --- a/kappfinder/common.h +++ b/kappfinder/common.h @@ -22,22 +22,22 @@ #ifndef COMMON_H #define COMMON_H -#include <qlistview.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqstring.h> class AppLnkCache { public: - QString destDir; - QString destName; - QString templ; - QCheckListItem *item; + TQString destDir; + TQString destName; + TQString templ; + TQCheckListItem *item; }; -bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ, - QString destDir = QString::null ); -void createDesktopFiles( QPtrList<AppLnkCache> &appCache, int &added ); -void decorateDirs( QString destDir = QString::null ); +bool scanDesktopFile( TQPtrList<AppLnkCache> &appCache, const TQString &templ, + TQString destDir = TQString::null ); +void createDesktopFiles( TQPtrList<AppLnkCache> &appCache, int &added ); +void decorateDirs( TQString destDir = TQString::null ); #endif diff --git a/kappfinder/main_install.cpp b/kappfinder/main_install.cpp index 46bbaa06b..298ff06bb 100644 --- a/kappfinder/main_install.cpp +++ b/kappfinder/main_install.cpp @@ -25,7 +25,7 @@ #include <klocale.h> #include <kstandarddirs.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <stdio.h> @@ -42,14 +42,14 @@ int main( int argc, char *argv[] ) return -1; } - QStringList templates = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true ); + TQStringList templates = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true ); - QString dir = QString( argv[ 1 ] ) + "/"; + TQString dir = TQString( argv[ 1 ] ) + "/"; - QPtrList<AppLnkCache> appCache; + TQPtrList<AppLnkCache> appCache; appCache.setAutoDelete( true ); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = templates.begin(); it != templates.end(); ++it ) scanDesktopFile( appCache, *it, dir ); diff --git a/kappfinder/toplevel.cpp b/kappfinder/toplevel.cpp index dfae10938..660c5b498 100644 --- a/kappfinder/toplevel.cpp +++ b/kappfinder/toplevel.cpp @@ -35,22 +35,22 @@ #include <kstdguiitem.h> #include <kstartupinfo.h> -#include <qaccel.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qdir.h> -#include <qregexp.h> +#include <tqaccel.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqdir.h> +#include <tqregexp.h> #include "toplevel.h" -TopLevel::TopLevel( const QString &destDir, QWidget *parent, const char *name ) +TopLevel::TopLevel( const TQString &destDir, TQWidget *parent, const char *name ) : KDialog( parent, name, true ) { setCaption( i18n( "KAppfinder" ) ); - QVBoxLayout *layout = new QVBoxLayout( this, marginHint() ); + TQVBoxLayout *layout = new TQVBoxLayout( this, marginHint() ); - QLabel *label = new QLabel( i18n( "The application finder looks for non-KDE " + TQLabel *label = new TQLabel( i18n( "The application finder looks for non-KDE " "applications on your system and adds " "them to the KDE menu system. " "Click 'Scan' to begin, select the desired applications and then click 'Apply'."), this); @@ -59,53 +59,53 @@ TopLevel::TopLevel( const QString &destDir, QWidget *parent, const char *name ) layout->addSpacing( 5 ); - mListView = new QListView( this ); + mListView = new TQListView( this ); mListView->addColumn( i18n( "Application" ) ); mListView->addColumn( i18n( "Description" ) ); mListView->addColumn( i18n( "Command" ) ); mListView->setMinimumSize( 300, 300 ); mListView->setRootIsDecorated( true ); mListView->setAllColumnsShowFocus( true ); - mListView->setSelectionMode(QListView::NoSelection); + mListView->setSelectionMode(TQListView::NoSelection); layout->addWidget( mListView ); mProgress = new KProgress( this ); mProgress->setPercentageVisible( false ); layout->addWidget( mProgress ); - mSummary = new QLabel( i18n( "Summary:" ), this ); + mSummary = new TQLabel( i18n( "Summary:" ), this ); layout->addWidget( mSummary ); KButtonBox* bbox = new KButtonBox( this ); - mScanButton = bbox->addButton( KGuiItem( i18n( "Scan" ), "find"), this, SLOT( slotScan() ) ); + mScanButton = bbox->addButton( KGuiItem( i18n( "Scan" ), "find"), this, TQT_SLOT( slotScan() ) ); bbox->addStretch( 5 ); mSelectButton = bbox->addButton( i18n( "Select All" ), this, - SLOT( slotSelectAll() ) ); + TQT_SLOT( slotSelectAll() ) ); mSelectButton->setEnabled( false ); mUnSelectButton = bbox->addButton( i18n( "Unselect All" ), this, - SLOT( slotUnselectAll() ) ); + TQT_SLOT( slotUnselectAll() ) ); mUnSelectButton->setEnabled( false ); bbox->addStretch( 5 ); - mApplyButton = bbox->addButton( KStdGuiItem::apply(), this, SLOT( slotCreate() ) ); + mApplyButton = bbox->addButton( KStdGuiItem::apply(), this, TQT_SLOT( slotCreate() ) ); mApplyButton->setEnabled( false ); - bbox->addButton( KStdGuiItem::close(), kapp, SLOT( quit() ) ); + bbox->addButton( KStdGuiItem::close(), kapp, TQT_SLOT( quit() ) ); bbox->layout(); layout->addWidget( bbox ); - connect( kapp, SIGNAL( lastWindowClosed() ), kapp, SLOT( quit() ) ); + connect( kapp, TQT_SIGNAL( lastWindowClosed() ), kapp, TQT_SLOT( quit() ) ); mAppCache.setAutoDelete( true ); adjustSize(); mDestDir = destDir; - mDestDir = mDestDir.replace( QRegExp( "^~/" ), QDir::homeDirPath() + "/" ); + mDestDir = mDestDir.replace( TQRegExp( "^~/" ), TQDir::homeDirPath() + "/" ); KStartupInfo::appStarted(); - QAccel *accel = new QAccel( this ); - accel->connectItem( accel->insertItem( Key_Q + CTRL ), kapp, SLOT( quit() ) ); + TQAccel *accel = new TQAccel( this ); + accel->connectItem( accel->insertItem( Key_Q + CTRL ), kapp, TQT_SLOT( quit() ) ); KAcceleratorManager::manage( this ); } @@ -116,8 +116,8 @@ TopLevel::~TopLevel() mAppCache.clear(); } -QListViewItem* TopLevel::addGroupItem( QListViewItem *parent, const QString &relPath, - const QString &name ) +TQListViewItem* TopLevel::addGroupItem( TQListViewItem *parent, const TQString &relPath, + const TQString &name ) { KServiceGroup::Ptr root = KServiceGroup::group( relPath ); if( !root ) @@ -129,8 +129,8 @@ QListViewItem* TopLevel::addGroupItem( QListViewItem *parent, const QString &rel KSycocaEntry *p = (*it); if ( p->isType( KST_KServiceGroup ) ) { KServiceGroup* serviceGroup = static_cast<KServiceGroup*>( p ); - if ( QString( "%1%2/" ).arg( relPath ).arg( name ) == serviceGroup->relPath() ) { - QListViewItem* retval; + if ( TQString( "%1%2/" ).arg( relPath ).arg( name ) == serviceGroup->relPath() ) { + TQListViewItem* retval; if ( parent ) retval = parent->firstChild(); else @@ -143,11 +143,11 @@ QListViewItem* TopLevel::addGroupItem( QListViewItem *parent, const QString &rel retval = retval->nextSibling(); } - QListViewItem *item; + TQListViewItem *item; if ( parent ) - item = new QListViewItem( parent, serviceGroup->caption() ); + item = new TQListViewItem( parent, serviceGroup->caption() ); else - item = new QListViewItem( mListView, serviceGroup->caption() ); + item = new TQListViewItem( mListView, serviceGroup->caption() ); item->setPixmap( 0, SmallIcon( serviceGroup->icon() ) ); item->setOpen( true ); @@ -177,12 +177,12 @@ void TopLevel::slotScan() mListView->clear(); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = mTemplates.begin(); it != mTemplates.end(); ++it ) { // eye candy mProgress->setProgress( mProgress->progress() + 1 ); - QString desktopName = *it; + TQString desktopName = *it; int i = desktopName.findRev('/'); desktopName = desktopName.mid(i+1); i = desktopName.findRev('.'); @@ -206,16 +206,16 @@ void TopLevel::slotScan() // copy over the desktop file, if exists if ( scanDesktopFile( mAppCache, *it, mDestDir ) ) { - QString relPath = *it; + TQString relPath = *it; int pos = relPath.find( "kappfinder/apps/" ); relPath = relPath.mid( pos + strlen( "kappfinder/apps/" ) ); relPath = relPath.left( relPath.findRev( '/' ) + 1 ); - QStringList dirList = QStringList::split( '/', relPath ); + TQStringList dirList = TQStringList::split( '/', relPath ); - QListViewItem *dirItem = 0; - QString tmpRelPath = QString::null; + TQListViewItem *dirItem = 0; + TQString tmpRelPath = TQString::null; - QStringList::Iterator tmpIt; + TQStringList::Iterator tmpIt; for ( tmpIt = dirList.begin(); tmpIt != dirList.end(); ++tmpIt ) { dirItem = addGroupItem( dirItem, tmpRelPath, *tmpIt ); tmpRelPath += *tmpIt + '/'; @@ -223,11 +223,11 @@ void TopLevel::slotScan() mFound++; - QCheckListItem *item; + TQCheckListItem *item; if ( dirItem ) - item = new QCheckListItem( dirItem, desktop.readName(), QCheckListItem::CheckBox ); + item = new TQCheckListItem( dirItem, desktop.readName(), TQCheckListItem::CheckBox ); else - item = new QCheckListItem( mListView, desktop.readName(), QCheckListItem::CheckBox ); + item = new TQCheckListItem( mListView, desktop.readName(), TQCheckListItem::CheckBox ); item->setPixmap( 0, loader->loadIcon( desktop.readIcon(), KIcon::Small ) ); item->setText( 1, desktop.readGenericName() ); @@ -241,7 +241,7 @@ void TopLevel::slotScan() } // update summary - QString sum( i18n( "Summary: found %n application", + TQString sum( i18n( "Summary: found %n application", "Summary: found %n applications", mFound ) ); mSummary->setText( sum ); } @@ -284,9 +284,9 @@ void TopLevel::slotCreate() KService::rebuildKSycoca(this); - QString message( i18n( "%n application was added to the KDE menu system.", + TQString message( i18n( "%n application was added to the KDE menu system.", "%n applications were added to the KDE menu system.", mAdded ) ); - KMessageBox::information( this, message, QString::null, "ShowInformation" ); + KMessageBox::information( this, message, TQString::null, "ShowInformation" ); } #include "toplevel.moc" diff --git a/kappfinder/toplevel.h b/kappfinder/toplevel.h index 972e5adfb..a1765444c 100644 --- a/kappfinder/toplevel.h +++ b/kappfinder/toplevel.h @@ -24,7 +24,7 @@ #include <kdialog.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include "common.h" @@ -38,7 +38,7 @@ class TopLevel : public KDialog Q_OBJECT public: - TopLevel( const QString &destDir, QWidget *parent = 0, const char *name = 0 ); + TopLevel( const TQString &destDir, TQWidget *parent = 0, const char *name = 0 ); ~TopLevel(); public slots: @@ -48,21 +48,21 @@ class TopLevel : public KDialog void slotUnselectAll(); private: - QListViewItem *addGroupItem( QListViewItem *parent, const QString &relPath, - const QString &name ); + TQListViewItem *addGroupItem( TQListViewItem *parent, const TQString &relPath, + const TQString &name ); KProgress *mProgress; - QLabel *mSummary; - QListView *mListView; - QPushButton *mApplyButton; - QPushButton *mQuitButton; - QPushButton *mScanButton; - QPushButton *mSelectButton; - QPushButton *mUnSelectButton; - QString mDestDir; - QStringList mTemplates; - - QPtrList<AppLnkCache> mAppCache; + TQLabel *mSummary; + TQListView *mListView; + TQPushButton *mApplyButton; + TQPushButton *mQuitButton; + TQPushButton *mScanButton; + TQPushButton *mSelectButton; + TQPushButton *mUnSelectButton; + TQString mDestDir; + TQStringList mTemplates; + + TQPtrList<AppLnkCache> mAppCache; int mFound, mAdded; }; diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp index 00b58b8b5..70c81d465 100644 --- a/kate/app/kateapp.cpp +++ b/kate/app/kateapp.cpp @@ -42,10 +42,10 @@ #include <ksimpleconfig.h> #include <kstartupinfo.h> -#include <qfile.h> -#include <qtimer.h> -#include <qdir.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqdir.h> +#include <tqtextcodec.h> #include <stdlib.h> #include <unistd.h> @@ -81,7 +81,7 @@ KateApp::KateApp (KCmdLineArgs *args) m_obj = new KateAppDCOPIface (this); kdDebug()<<"Setting KATE_PID: '"<<getpid()<<"'"<<endl; - ::setenv( "KATE_PID", QString("%1").arg(getpid()).latin1(), 1 ); + ::setenv( "KATE_PID", TQString("%1").arg(getpid()).latin1(), 1 ); // handle restore different if (isRestored()) @@ -129,10 +129,10 @@ Kate::Application *KateApp::application () * Has always been the Kate Versioning Scheme: * KDE X.Y.Z contains Kate X-1.Y.Z */ -QString KateApp::kateVersion (bool fullVersion) +TQString KateApp::kateVersion (bool fullVersion) { - return fullVersion ? QString ("%1.%2.%3").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()).arg(KDE::versionRelease()) - : QString ("%1.%2").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()); + return fullVersion ? TQString ("%1.%2.%3").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()).arg(KDE::versionRelease()) + : TQString ("%1.%2").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()); } void KateApp::restoreKate () @@ -142,7 +142,7 @@ void KateApp::restoreKate () // activate again correct session!!! sessionConfig()->setGroup("General"); - QString lastSession (sessionConfig()->readEntry ("Last Session", "default.katesession")); + TQString lastSession (sessionConfig()->readEntry ("Last Session", "default.katesession")); sessionManager()->activateSession (new KateSession (sessionManager(), lastSession, ""), false, false, false); m_docManager->restoreDocumentList (sessionConfig()); @@ -151,7 +151,7 @@ void KateApp::restoreKate () // restore all windows ;) for (int n=1; KMainWindow::canBeRestored(n); n++) - newMainWindow(sessionConfig(), QString ("%1").arg(n)); + newMainWindow(sessionConfig(), TQString ("%1").arg(n)); // oh, no mainwindow, create one, should not happen, but make sure ;) if (mainWindows() == 0) @@ -166,7 +166,7 @@ bool KateApp::startupKate () // user specified session to open if (m_args->isSet ("start")) { - sessionManager()->activateSession (sessionManager()->giveSession (QString::fromLocal8Bit(m_args->getOption("start"))), false, false); + sessionManager()->activateSession (sessionManager()->giveSession (TQString::fromLocal8Bit(m_args->getOption("start"))), false, false); } else { @@ -186,7 +186,7 @@ bool KateApp::startupKate () // notify about start KStartupInfo::setNewStartupId( activeMainWindow(), startupId()); - QTextCodec *codec = m_args->isSet("encoding") ? QTextCodec::codecForName(m_args->getOption("encoding")) : 0; + TQTextCodec *codec = m_args->isSet("encoding") ? TQTextCodec::codecForName(m_args->getOption("encoding")) : 0; bool tempfileSet = KCmdLineArgs::isTempFileSet(); @@ -195,7 +195,7 @@ bool KateApp::startupKate () for (int z=0; z<m_args->count(); z++) { // this file is no local dir, open it, else warn - bool noDir = !m_args->url(z).isLocalFile() || !QDir (m_args->url(z).path()).exists(); + bool noDir = !m_args->url(z).isLocalFile() || !TQDir (m_args->url(z).path()).exists(); if (noDir) { @@ -203,7 +203,7 @@ bool KateApp::startupKate () if (codec) id = activeMainWindow()->viewManager()->openURL( m_args->url(z), codec->name(), false, tempfileSet ); else - id = activeMainWindow()->viewManager()->openURL( m_args->url(z), QString::null, false, tempfileSet ); + id = activeMainWindow()->viewManager()->openURL( m_args->url(z), TQString::null, false, tempfileSet ); } else KMessageBox::sorry( activeMainWindow(), @@ -215,14 +215,14 @@ bool KateApp::startupKate () // handle stdin input if( m_args->isSet( "stdin" ) ) { - QTextIStream input(stdin); + TQTextIStream input(stdin); // set chosen codec if (codec) input.setCodec (codec); - QString line; - QString text; + TQString line; + TQString text; do { @@ -295,19 +295,19 @@ KateSessionManager *KateApp::sessionManager () return m_sessionManager; } -bool KateApp::openURL (const KURL &url, const QString &encoding, bool isTempFile) +bool KateApp::openURL (const KURL &url, const TQString &encoding, bool isTempFile) { KateMainWindow *mainWindow = activeMainWindow (); if (!mainWindow) return false; - QTextCodec *codec = encoding.isEmpty() ? 0 : QTextCodec::codecForName(encoding.latin1()); + TQTextCodec *codec = encoding.isEmpty() ? 0 : TQTextCodec::codecForName(encoding.latin1()); kdDebug () << "OPEN URL "<< encoding << endl; // this file is no local dir, open it, else warn - bool noDir = !url.isLocalFile() || !QDir (url.path()).exists(); + bool noDir = !url.isLocalFile() || !TQDir (url.path()).exists(); if (noDir) { @@ -315,7 +315,7 @@ bool KateApp::openURL (const KURL &url, const QString &encoding, bool isTempFile if (codec) mainWindow->viewManager()->openURL( url, codec->name(), true, isTempFile ); else - mainWindow->viewManager()->openURL( url, QString::null, true, isTempFile ); + mainWindow->viewManager()->openURL( url, TQString::null, true, isTempFile ); } else KMessageBox::sorry( mainWindow, @@ -336,7 +336,7 @@ bool KateApp::setCursor (int line, int column) return true; } -bool KateApp::openInput (const QString &text) +bool KateApp::openInput (const TQString &text) { activeMainWindow()->viewManager()->openURL( "", "", true ); @@ -348,7 +348,7 @@ bool KateApp::openInput (const QString &text) return true; } -KateMainWindow *KateApp::newMainWindow (KConfig *sconfig, const QString &sgroup) +KateMainWindow *KateApp::newMainWindow (KConfig *sconfig, const TQString &sgroup) { KateMainWindow *mainWindow = new KateMainWindow (sconfig, sgroup); m_mainWindows.push_back (mainWindow); diff --git a/kate/app/kateapp.h b/kate/app/kateapp.h index ff1d9d967..b67901cd9 100644 --- a/kate/app/kateapp.h +++ b/kate/app/kateapp.h @@ -24,7 +24,7 @@ #include <kapplication.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class KateSessionManager; class KateAppDCOPIface; @@ -75,7 +75,7 @@ class KDE_EXPORT KateApp : public KApplication * @param fullVersion should full version be returned? * @return Kate version */ - static QString kateVersion (bool fullVersion = true); + static TQString kateVersion (bool fullVersion = true); /** * kate init @@ -140,7 +140,7 @@ class KDE_EXPORT KateApp : public KApplication * @param sgroup session group for this window * @return new constructed main window */ - KateMainWindow *newMainWindow (KConfig *sconfig = 0, const QString &sgroup = ""); + KateMainWindow *newMainWindow (KConfig *sconfig = 0, const TQString &sgroup = ""); /** * removes the mainwindow given, DOES NOT DELETE IT @@ -180,7 +180,7 @@ class KDE_EXPORT KateApp : public KApplication * @param isTempFile if set to true and the file is a local file, it will be deleted when the document is closed. * @return success */ - bool openURL (const KURL &url, const QString &encoding, bool isTempFile ); + bool openURL (const KURL &url, const TQString &encoding, bool isTempFile ); /** * position cursor in current active view @@ -196,7 +196,7 @@ class KDE_EXPORT KateApp : public KApplication * @param text text to fill in the new doc/view * @return success */ - bool openInput (const QString &text); + bool openInput (const TQString &text); private: /** @@ -227,7 +227,7 @@ class KDE_EXPORT KateApp : public KApplication /** * known main windows */ - QValueList<KateMainWindow*> m_mainWindows; + TQValueList<KateMainWindow*> m_mainWindows; /** * dcop interface diff --git a/kate/app/kateappIface.cpp b/kate/app/kateappIface.cpp index b70be960a..259e48b89 100644 --- a/kate/app/kateappIface.cpp +++ b/kate/app/kateappIface.cpp @@ -69,12 +69,12 @@ DCOPRef KateAppDCOPIface::mainWindow (uint n) return DCOPRef (); } -bool KateAppDCOPIface::openURL (KURL url, QString encoding) +bool KateAppDCOPIface::openURL (KURL url, TQString encoding) { return m_app->openURL (url, encoding, false); } -bool KateAppDCOPIface::openURL (KURL url, QString encoding, bool isTempFile) +bool KateAppDCOPIface::openURL (KURL url, TQString encoding, bool isTempFile) { return m_app->openURL (url, encoding, isTempFile); } @@ -84,19 +84,19 @@ bool KateAppDCOPIface::setCursor (int line, int column) return m_app->setCursor (line, column); } -bool KateAppDCOPIface::openInput (QString text) +bool KateAppDCOPIface::openInput (TQString text) { return m_app->openInput (text); } -bool KateAppDCOPIface::activateSession (QString session) +bool KateAppDCOPIface::activateSession (TQString session) { m_app->sessionManager()->activateSession (m_app->sessionManager()->giveSession (session)); return true; } -const QString & KateAppDCOPIface::session() const +const TQString & KateAppDCOPIface::session() const { return m_app->sessionManager()->activeSession()->sessionName(); } diff --git a/kate/app/kateappIface.h b/kate/app/kateappIface.h index 577c36e41..c57e788c8 100644 --- a/kate/app/kateappIface.h +++ b/kate/app/kateappIface.h @@ -49,7 +49,7 @@ class KateAppDCOPIface : public DCOPObject * @param encoding encoding name * @return success */ - bool openURL (KURL url, QString encoding); + bool openURL (KURL url, TQString encoding); /** * Like the above, but adds an option to let the documentManager know @@ -57,7 +57,7 @@ class KateAppDCOPIface : public DCOPObject * @p isTempFile should be set to true with the --tempfile option set ONLY, * files opened with this set to true will be deleted when closed. */ - bool openURL(KURL url, QString encoding, bool isTempFile); + bool openURL(KURL url, TQString encoding, bool isTempFile); /** * set cursor of active view in active main window @@ -73,19 +73,19 @@ class KateAppDCOPIface : public DCOPObject * @param text text to fill in the new doc/view * @return success */ - bool openInput (QString text); + bool openInput (TQString text); /** * activate a given session * @param session session name * @return success */ - bool activateSession (QString session); + bool activateSession (TQString session); /** * @return the name of the active session */ - const QString & session() const; + const TQString & session() const; private: KateApp *m_app; diff --git a/kate/app/kateconfigdialog.cpp b/kate/app/kateconfigdialog.cpp index 62d86054b..47a7de19c 100644 --- a/kate/app/kateconfigdialog.cpp +++ b/kate/app/kateconfigdialog.cpp @@ -32,17 +32,17 @@ #include "katefilelist.h" #include "kateexternaltools.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qvbox.h> -#include <qwhatsthis.h> -#include <qcombobox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> #include <kinstance.h> #include <kdebug.h> @@ -83,7 +83,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) pluginPages.setAutoDelete (false); editorPages.setAutoDelete (false); - QStringList path; + TQStringList path; setShowIconsInTreeList(true); @@ -95,75 +95,75 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) //BEGIN General page path << i18n("Application") << i18n("General"); - QFrame* frGeneral = addPage(path, i18n("General Options"), BarIcon("gohome", KIcon::SizeSmall)); + TQFrame* frGeneral = addPage(path, i18n("General Options"), BarIcon("gohome", KIcon::SizeSmall)); - QVBoxLayout *lo = new QVBoxLayout( frGeneral ); + TQVBoxLayout *lo = new TQVBoxLayout( frGeneral ); lo->setSpacing(KDialog::spacingHint()); config->setGroup("General"); // GROUP with the one below: "Appearance" - QButtonGroup *bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("&Appearance"), frGeneral ); + TQButtonGroup *bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Appearance"), frGeneral ); lo->addWidget( bgStartup ); // show full path in title config->setGroup("General"); - cb_fullPath = new QCheckBox( i18n("&Show full path in title"), bgStartup); + cb_fullPath = new TQCheckBox( i18n("&Show full path in title"), bgStartup); cb_fullPath->setChecked( mainWindow->viewManager()->getShowFullPath() ); - QWhatsThis::add(cb_fullPath,i18n("If this option is checked, the full document path will be shown in the window caption.")); - connect( cb_fullPath, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + TQWhatsThis::add(cb_fullPath,i18n("If this option is checked, the full document path will be shown in the window caption.")); + connect( cb_fullPath, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); // GROUP with the one below: "Behavior" - bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("&Behavior"), frGeneral ); + bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Behavior"), frGeneral ); lo->addWidget( bgStartup ); // sync the konsole ? - cb_syncKonsole = new QCheckBox(bgStartup); + cb_syncKonsole = new TQCheckBox(bgStartup); cb_syncKonsole->setText(i18n("Sync &terminal emulator with active document")); cb_syncKonsole->setChecked(parent->syncKonsole); - QWhatsThis::add( cb_syncKonsole, i18n( + TQWhatsThis::add( cb_syncKonsole, i18n( "If this is checked, the built in Konsole will <code>cd</code> to the directory " "of the active document when started and whenever the active document changes, " "if the document is a local file.") ); - connect( cb_syncKonsole, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + connect( cb_syncKonsole, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); // modified files notification - cb_modNotifications = new QCheckBox( + cb_modNotifications = new TQCheckBox( i18n("Wa&rn about files modified by foreign processes"), bgStartup ); cb_modNotifications->setChecked( parent->modNotification ); - QWhatsThis::add( cb_modNotifications, i18n( + TQWhatsThis::add( cb_modNotifications, i18n( "If enabled, when Kate receives focus you will be asked what to do with " "files that have been modified on the hard disk. If not enabled, you will " "be asked what to do with a file that has been modified on the hard disk only " "when that file gains focus inside Kate.") ); - connect( cb_modNotifications, SIGNAL( toggled( bool ) ), - this, SLOT( slotChanged() ) ); + connect( cb_modNotifications, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotChanged() ) ); // GROUP with the one below: "Meta-informations" - bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("Meta-Information"), frGeneral ); + bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Meta-Information"), frGeneral ); lo->addWidget( bgStartup ); // save meta infos - cb_saveMetaInfos = new QCheckBox( bgStartup ); + cb_saveMetaInfos = new TQCheckBox( bgStartup ); cb_saveMetaInfos->setText(i18n("Keep &meta-information past sessions")); cb_saveMetaInfos->setChecked(KateDocManager::self()->getSaveMetaInfos()); - QWhatsThis::add(cb_saveMetaInfos, i18n( + TQWhatsThis::add(cb_saveMetaInfos, i18n( "Check this if you want document configuration like for example " "bookmarks to be saved past editor sessions. The configuration will be " "restored if the document has not changed when reopened.")); - connect( cb_saveMetaInfos, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + connect( cb_saveMetaInfos, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); // meta infos days - QHBox *hbDmf = new QHBox( bgStartup ); + TQHBox *hbDmf = new TQHBox( bgStartup ); hbDmf->setEnabled(KateDocManager::self()->getSaveMetaInfos()); - QLabel *lDmf = new QLabel( i18n("&Delete unused meta-information after:"), hbDmf ); - sb_daysMetaInfos = new QSpinBox( 0, 180, 1, hbDmf ); + TQLabel *lDmf = new TQLabel( i18n("&Delete unused meta-information after:"), hbDmf ); + sb_daysMetaInfos = new TQSpinBox( 0, 180, 1, hbDmf ); sb_daysMetaInfos->setSpecialValueText(i18n("(never)")); sb_daysMetaInfos->setSuffix(i18n(" day(s)")); sb_daysMetaInfos->setValue( KateDocManager::self()->getDaysMetaInfos() ); lDmf->setBuddy( sb_daysMetaInfos ); - connect( cb_saveMetaInfos, SIGNAL( toggled( bool ) ), hbDmf, SLOT( setEnabled( bool ) ) ); - connect( sb_daysMetaInfos, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) ); + connect( cb_saveMetaInfos, TQT_SIGNAL( toggled( bool ) ), hbDmf, TQT_SLOT( setEnabled( bool ) ) ); + connect( sb_daysMetaInfos, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) ); lo->addStretch(1); // :-] works correct without autoadd //END General page @@ -172,36 +172,36 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) //BEGIN Session page path << i18n("Application") << i18n("Sessions"); - QFrame* frSessions = addPage(path, i18n("Session Management"), BarIcon("history", KIcon::SizeSmall)); + TQFrame* frSessions = addPage(path, i18n("Session Management"), BarIcon("history", KIcon::SizeSmall)); - lo = new QVBoxLayout( frSessions ); + lo = new TQVBoxLayout( frSessions ); lo->setSpacing(KDialog::spacingHint()); // GROUP with the one below: "Startup" - bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("Elements of Sessions"), frSessions ); + bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Elements of Sessions"), frSessions ); lo->addWidget( bgStartup ); // restore view config - cb_restoreVC = new QCheckBox( bgStartup ); + cb_restoreVC = new TQCheckBox( bgStartup ); cb_restoreVC->setText(i18n("Include &window configuration")); config->setGroup("General"); cb_restoreVC->setChecked( config->readBoolEntry("Restore Window Configuration", true) ); - QWhatsThis::add(cb_restoreVC, i18n( + TQWhatsThis::add(cb_restoreVC, i18n( "Check this if you want all your views and frames restored each time you open Kate")); - connect( cb_restoreVC, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + connect( cb_restoreVC, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); - QRadioButton *rb1, *rb2, *rb3; + TQRadioButton *rb1, *rb2, *rb3; - sessions_start = new QButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Startup"), frSessions ); + sessions_start = new TQButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Startup"), frSessions ); lo->add (sessions_start); sessions_start->setRadioButtonExclusive( true ); - sessions_start->insert( rb1=new QRadioButton( i18n("&Start new session"), sessions_start ), 0 ); - sessions_start->insert( rb2=new QRadioButton( i18n("&Load last-used session"), sessions_start ), 1 ); - sessions_start->insert( rb3=new QRadioButton( i18n("&Manually choose a session"), sessions_start ), 2 ); + sessions_start->insert( rb1=new TQRadioButton( i18n("&Start new session"), sessions_start ), 0 ); + sessions_start->insert( rb2=new TQRadioButton( i18n("&Load last-used session"), sessions_start ), 1 ); + sessions_start->insert( rb3=new TQRadioButton( i18n("&Manually choose a session"), sessions_start ), 2 ); config->setGroup("General"); - QString sesStart (config->readEntry ("Startup Session", "manual")); + TQString sesStart (config->readEntry ("Startup Session", "manual")); if (sesStart == "new") sessions_start->setButton (0); else if (sesStart == "last") @@ -209,20 +209,20 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) else sessions_start->setButton (2); - connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); + connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb3, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); - sessions_exit = new QButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Exit or Session Switch"), frSessions ); + sessions_exit = new TQButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Exit or Session Switch"), frSessions ); lo->add (sessions_exit); sessions_exit->setRadioButtonExclusive( true ); - sessions_exit->insert( rb1=new QRadioButton( i18n("&Do not save session"), sessions_exit ), 0 ); - sessions_exit->insert( rb2=new QRadioButton( i18n("&Save session"), sessions_exit ), 1 ); - sessions_exit->insert( rb3=new QRadioButton( i18n("&Ask user"), sessions_exit ), 2 ); + sessions_exit->insert( rb1=new TQRadioButton( i18n("&Do not save session"), sessions_exit ), 0 ); + sessions_exit->insert( rb2=new TQRadioButton( i18n("&Save session"), sessions_exit ), 1 ); + sessions_exit->insert( rb3=new TQRadioButton( i18n("&Ask user"), sessions_exit ), 2 ); config->setGroup("General"); - QString sesExit (config->readEntry ("Session Exit", "save")); + TQString sesExit (config->readEntry ("Session Exit", "save")); if (sesExit == "discard") sessions_exit->setButton (0); else if (sesExit == "save") @@ -230,9 +230,9 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) else sessions_exit->setButton (2); - connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); + connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb3, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); lo->addStretch(1); // :-] works correct without autoadd //END Session page @@ -242,11 +242,11 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) // file selector page path << i18n("Application") << i18n("File Selector"); - QVBox *page = addVBoxPage( path, i18n("File Selector Settings"), + TQVBox *page = addVBoxPage( path, i18n("File Selector Settings"), BarIcon("fileopen", KIcon::SizeSmall) ); fileSelConfigPage = new KFSConfigPage( page, "file selector config page", mainWindow->fileselector ); - connect( fileSelConfigPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( fileSelConfigPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); path.clear(); path << i18n("Application") << i18n("Document List"); @@ -254,14 +254,14 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) BarIcon("view_text", KIcon::SizeSmall) ); filelistConfigPage = new KFLConfigPage( page, "file list config page", mainWindow->filelist ); - connect( filelistConfigPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( filelistConfigPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); path.clear(); path << i18n("Application") << i18n("Plugins"); - /*QVBox **/page=addVBoxPage(path,i18n("Plugin Manager"), + /*TQVBox **/page=addVBoxPage(path,i18n("Plugin Manager"), BarIcon("connect_established",KIcon::SizeSmall)); KateConfigPluginPage *configPluginPage = new KateConfigPluginPage(page, this); - connect( configPluginPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( configPluginPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); // Tools->External Tools menu path.clear(); @@ -269,7 +269,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) page = addVBoxPage( path, i18n("External Tools"), BarIcon("configure", KIcon::SizeSmall) ); configExternalToolsPage = new KateExternalToolsConfigWidget(page, "external tools config page"); - connect( configExternalToolsPage, SIGNAL(changed()), this, SLOT(slotChanged()) ); + connect( configExternalToolsPage, TQT_SIGNAL(changed()), this, TQT_SLOT(slotChanged()) ); // editor widgets from kwrite/kwdialog path.clear(); @@ -280,11 +280,11 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) { path.clear(); path << i18n("Editor") << KTextEditor::configInterfaceExtension (v->document())->configPageName (i); - /*QVBox **/page = addVBoxPage(path, KTextEditor::configInterfaceExtension (v->document())->configPageFullName (i), + /*TQVBox **/page = addVBoxPage(path, KTextEditor::configInterfaceExtension (v->document())->configPageFullName (i), KTextEditor::configInterfaceExtension (v->document())->configPagePixmap(i, KIcon::SizeSmall) ); KTextEditor::ConfigPage *cPage = KTextEditor::configInterfaceExtension (v->document())->configPage(i, page); - connect( cPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( cPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); editorPages.append (cPage); } @@ -312,15 +312,15 @@ void KateConfigDialog::addPluginPage (Kate::Plugin *plugin) for (uint i=0; i<Kate::pluginConfigInterfaceExtension(plugin)->configPages(); i++) { - QStringList path; + TQStringList path; path.clear(); path << i18n("Application")<<i18n("Plugins") << Kate::pluginConfigInterfaceExtension(plugin)->configPageName(i); - QVBox *page=addVBoxPage(path, Kate::pluginConfigInterfaceExtension(plugin)->configPageFullName(i), Kate::pluginConfigInterfaceExtension(plugin)->configPagePixmap(i, KIcon::SizeSmall)); + TQVBox *page=addVBoxPage(path, Kate::pluginConfigInterfaceExtension(plugin)->configPageFullName(i), Kate::pluginConfigInterfaceExtension(plugin)->configPagePixmap(i, KIcon::SizeSmall)); PluginPageListItem *info=new PluginPageListItem; info->plugin = plugin; info->page = Kate::pluginConfigInterfaceExtension(plugin)->configPage (i, page); - connect( info->page, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( info->page, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); pluginPages.append(info); } } @@ -334,7 +334,7 @@ void KateConfigDialog::removePluginPage (Kate::Plugin *plugin) { if ( pluginPages.at(i)->plugin == plugin ) { - QWidget *w = pluginPages.at(i)->page->parentWidget(); + TQWidget *w = pluginPages.at(i)->page->parentWidget(); delete pluginPages.at(i)->page; delete w; pluginPages.remove(pluginPages.at(i)); diff --git a/kate/app/kateconfigdialog.h b/kate/app/kateconfigdialog.h index 3fb523b61..1d8c38a96 100644 --- a/kate/app/kateconfigdialog.h +++ b/kate/app/kateconfigdialog.h @@ -64,19 +64,19 @@ class KateConfigDialog : public KDialogBase Kate::View* v; bool dataChanged; - QCheckBox *cb_fullPath; - QCheckBox *cb_syncKonsole; - QCheckBox *cb_modNotifications; - QCheckBox *cb_saveMetaInfos; - QSpinBox *sb_daysMetaInfos; - QCheckBox* cb_restoreVC; - QButtonGroup *sessions_start; - QButtonGroup *sessions_exit; + TQCheckBox *cb_fullPath; + TQCheckBox *cb_syncKonsole; + TQCheckBox *cb_modNotifications; + TQCheckBox *cb_saveMetaInfos; + TQSpinBox *sb_daysMetaInfos; + TQCheckBox* cb_restoreVC; + TQButtonGroup *sessions_start; + TQButtonGroup *sessions_exit; Kate::ConfigPage *fileSelConfigPage; Kate::ConfigPage *filelistConfigPage; Kate::ConfigPage *configExternalToolsPage; - QPtrList<PluginPageListItem> pluginPages; - QPtrList<KTextEditor::ConfigPage> editorPages; + TQPtrList<PluginPageListItem> pluginPages; + TQPtrList<KTextEditor::ConfigPage> editorPages; }; #endif diff --git a/kate/app/kateconfigplugindialogpage.cpp b/kate/app/kateconfigplugindialogpage.cpp index 7269d5f5b..4aa56c78d 100644 --- a/kate/app/kateconfigplugindialogpage.cpp +++ b/kate/app/kateconfigplugindialogpage.cpp @@ -24,19 +24,19 @@ #include "kateconfigdialog.h" #include <klistbox.h> #include "kateapp.h" -#include <qstringlist.h> -#include <qhbox.h> -#include <qlabel.h> +#include <tqstringlist.h> +#include <tqhbox.h> +#include <tqlabel.h> #include <klocale.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <kiconloader.h> -#include <qwhatsthis.h> +#include <tqwhatsthis.h> class KatePluginListItem : public QCheckListItem { public: - KatePluginListItem(bool checked, KatePluginInfo *info, QListView *parent); + KatePluginListItem(bool checked, KatePluginInfo *info, TQListView *parent); KatePluginInfo *info() const { return mInfo; } protected: @@ -47,8 +47,8 @@ class KatePluginListItem : public QCheckListItem bool silentStateChange; }; -KatePluginListItem::KatePluginListItem(bool checked, KatePluginInfo *info, QListView *parent) - : QCheckListItem(parent, info->service->name(), CheckBox) +KatePluginListItem::KatePluginListItem(bool checked, KatePluginInfo *info, TQListView *parent) + : TQCheckListItem(parent, info->service->name(), CheckBox) , mInfo(info) , silentStateChange(false) { @@ -63,7 +63,7 @@ void KatePluginListItem::stateChange(bool b) static_cast<KatePluginListView *>(listView())->stateChanged(this, b); } -KatePluginListView::KatePluginListView(QWidget *parent, const char *name) +KatePluginListView::KatePluginListView(TQWidget *parent, const char *name) : KListView(parent, name) { } @@ -73,16 +73,16 @@ void KatePluginListView::stateChanged(KatePluginListItem *item, bool b) emit stateChange(item, b); } -KateConfigPluginPage::KateConfigPluginPage(QWidget *parent, KateConfigDialog *dialog):QVBox(parent) +KateConfigPluginPage::KateConfigPluginPage(TQWidget *parent, KateConfigDialog *dialog):TQVBox(parent) { myDialog=dialog; KatePluginListView* listView = new KatePluginListView(this); listView->addColumn(i18n("Name")); listView->addColumn(i18n("Comment")); - QWhatsThis::add(listView,i18n("Here you can see all available Kate plugins. Those with a check mark are loaded, and will be loaded again the next time Kate is started.")); + TQWhatsThis::add(listView,i18n("Here you can see all available Kate plugins. Those with a check mark are loaded, and will be loaded again the next time Kate is started.")); - connect(listView, SIGNAL(stateChange(KatePluginListItem *, bool)), this, SLOT(stateChange(KatePluginListItem *, bool))); + connect(listView, TQT_SIGNAL(stateChange(KatePluginListItem *, bool)), this, TQT_SLOT(stateChange(KatePluginListItem *, bool))); KatePluginList &pluginList (KatePluginManager::self()->pluginList()); for (unsigned int i=0; i < pluginList.size(); ++i) diff --git a/kate/app/kateconfigplugindialogpage.h b/kate/app/kateconfigplugindialogpage.h index f65da880b..c02c0411b 100644 --- a/kate/app/kateconfigplugindialogpage.h +++ b/kate/app/kateconfigplugindialogpage.h @@ -25,7 +25,7 @@ #include <klistview.h> -#include <qvbox.h> +#include <tqvbox.h> class KatePluginListItem; @@ -36,7 +36,7 @@ class KatePluginListView : public KListView friend class KatePluginListItem; public: - KatePluginListView (QWidget *parent = 0, const char *name = 0); + KatePluginListView (TQWidget *parent = 0, const char *name = 0); signals: void stateChange(KatePluginListItem *, bool); @@ -50,7 +50,7 @@ class KateConfigPluginPage: public QVBox Q_OBJECT public: - KateConfigPluginPage(QWidget *parent, class KateConfigDialog *dialog); + KateConfigPluginPage(TQWidget *parent, class KateConfigDialog *dialog); ~KateConfigPluginPage(){;}; private: diff --git a/kate/app/kateconsole.cpp b/kate/app/kateconsole.cpp index 5220859b2..a160162db 100644 --- a/kate/app/kateconsole.cpp +++ b/kate/app/kateconsole.cpp @@ -40,7 +40,7 @@ #include <kmessagebox.h> KateConsole::KateConsole (KateMainWindow *mw, KateMDI::ToolView* parent) - : QVBox (parent) + : TQVBox (parent) , m_part (0) , m_mw (mw) , m_toolView (parent) @@ -50,7 +50,7 @@ KateConsole::KateConsole (KateMainWindow *mw, KateMDI::ToolView* parent) KateConsole::~KateConsole () { if (m_part) - disconnect ( m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) ); + disconnect ( m_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); } void KateConsole::loadConsoleIfNeeded() @@ -74,7 +74,7 @@ void KateConsole::loadConsoleIfNeeded() m_part->widget()->show(); - connect ( m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) ); + connect ( m_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); if (m_mw->viewManager()->activeView()) if (m_mw->viewManager()->activeView()->getDoc()->url().isValid()) @@ -93,7 +93,7 @@ void KateConsole::slotDestroyed () } } -void KateConsole::showEvent(QShowEvent *) +void KateConsole::showEvent(TQShowEvent *) { if (m_part) return; @@ -109,7 +109,7 @@ void KateConsole::cd (const KURL &url) m_part->openURL (url); } -void KateConsole::sendInput( const QString& text ) +void KateConsole::sendInput( const TQString& text ) { loadConsoleIfNeeded(); diff --git a/kate/app/kateconsole.h b/kate/app/kateconsole.h index 1750df11d..e308f1df2 100644 --- a/kate/app/kateconsole.h +++ b/kate/app/kateconsole.h @@ -25,7 +25,7 @@ #include <kurl.h> -#include <qvbox.h> +#include <tqvbox.h> namespace KParts { class ReadOnlyPart; @@ -69,7 +69,7 @@ class KateConsole : public QVBox * send given text to console * @param text commands for console */ - void sendInput( const QString& text ); + void sendInput( const TQString& text ); public slots: /** @@ -94,7 +94,7 @@ class KateConsole : public QVBox * the konsole get shown * @param ev show event */ - void showEvent(QShowEvent *ev); + void showEvent(TQShowEvent *ev); private: /** diff --git a/kate/app/katedocmanager.cpp b/kate/app/katedocmanager.cpp index fe6491f78..f60c09783 100644 --- a/kate/app/katedocmanager.cpp +++ b/kate/app/katedocmanager.cpp @@ -42,12 +42,12 @@ #include <kio/job.h> #include <kwin.h> -#include <qdatetime.h> -#include <qtextcodec.h> -#include <qprogressdialog.h> +#include <tqdatetime.h> +#include <tqtextcodec.h> +#include <tqprogressdialog.h> -KateDocManager::KateDocManager (QObject *parent) - : QObject (parent) +KateDocManager::KateDocManager (TQObject *parent) + : TQObject (parent) , m_saveMetaInfos(true) , m_daysMetaInfos(0) { @@ -80,13 +80,13 @@ KateDocManager::~KateDocManager () // purge saved filesessions if (m_daysMetaInfos > 0) { - QStringList groups = m_metaInfos->groupList(); - QDateTime *def = new QDateTime(QDate(1970, 1, 1)); - for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it) + TQStringList groups = m_metaInfos->groupList(); + TQDateTime *def = new TQDateTime(TQDate(1970, 1, 1)); + for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it) { m_metaInfos->setGroup(*it); - QDateTime last = m_metaInfos->readDateTimeEntry("Time", def); - if (last.daysTo(QDateTime::currentDateTime()) > m_daysMetaInfos) + TQDateTime last = m_metaInfos->readDateTimeEntry("Time", def); + if (last.daysTo(TQDateTime::currentDateTime()) > m_daysMetaInfos) m_metaInfos->deleteGroup(*it); } delete def; @@ -116,7 +116,7 @@ Kate::Document *KateDocManager::createDoc () emit documentCreated ((Kate::Document *)doc); emit m_documentManager->documentCreated ((Kate::Document *)doc); - connect(doc,SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); + connect(doc,TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,TQT_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); return (Kate::Document *)doc; } @@ -204,7 +204,7 @@ uint KateDocManager::documents () int KateDocManager::findDocument ( KURL url ) { - QPtrListIterator<Kate::Document> it(m_docList); + TQPtrListIterator<Kate::Document> it(m_docList); for (; it.current(); ++it) { @@ -216,7 +216,7 @@ int KateDocManager::findDocument ( KURL url ) Kate::Document *KateDocManager::findDocumentByUrl( KURL url ) { - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { if ( it.current()->url() == url) return it.current(); @@ -231,7 +231,7 @@ bool KateDocManager::isOpen(KURL url) return findDocumentByUrl (url) != 0; } -Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding, uint *id, bool isTempFile) +Kate::Document *KateDocManager::openURL (const KURL& url,const TQString &encoding, uint *id, bool isTempFile) { // special handling if still only the first initial doc is there if (!documentList().isEmpty() && (documentList().count() == 1) && (!documentList().at(0)->isModified() && documentList().at(0)->url().isEmpty())) @@ -248,7 +248,7 @@ Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding if ( isTempFile && !url.isEmpty() && url.isLocalFile() ) { - QFileInfo fi( url.path() ); + TQFileInfo fi( url.path() ); if ( fi.exists() ) { m_tempFiles[ doc->documentNumber() ] = qMakePair(url, fi.lastModified()); @@ -256,7 +256,7 @@ Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding } } - connect(doc, SIGNAL(modStateChanged(Kate::Document *)), this, SLOT(slotModChanged(Kate::Document *))); + connect(doc, TQT_SIGNAL(modStateChanged(Kate::Document *)), this, TQT_SLOT(slotModChanged(Kate::Document *))); emit initialDocumentReplaced(); @@ -279,7 +279,7 @@ Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding if ( isTempFile && !url.isEmpty() && url.isLocalFile() ) { - QFileInfo fi( url.path() ); + TQFileInfo fi( url.path() ); if ( fi.exists() ) { m_tempFiles[ doc->documentNumber() ] = qMakePair(url, fi.lastModified()); @@ -298,7 +298,7 @@ bool KateDocManager::closeDocument(class Kate::Document *doc,bool closeURL) if (closeURL) if (!doc->closeURL()) return false; - QPtrList<Kate::View> closeList; + TQPtrList<Kate::View> closeList; uint documentNumber = doc->documentNumber(); for (uint i=0; i < KateApp::self()->mainWindows (); i++ ) @@ -308,7 +308,7 @@ bool KateDocManager::closeDocument(class Kate::Document *doc,bool closeURL) if ( closeURL && m_tempFiles.contains( documentNumber ) ) { - QFileInfo fi( m_tempFiles[ documentNumber ].first.path() ); + TQFileInfo fi( m_tempFiles[ documentNumber ].first.path() ); if ( fi.lastModified() <= m_tempFiles[ documentNumber ].second /*|| KMessageBox::questionYesNo( KateApp::self()->activeMainWindow(), i18n("The supposedly temporary file %1 has been modified. " @@ -346,7 +346,7 @@ bool KateDocManager::closeAllDocuments(bool closeURL) { bool res = true; - QPtrList<Kate::Document> docs = m_docList; + TQPtrList<Kate::Document> docs = m_docList; for (uint i=0; i < KateApp::self()->mainWindows (); i++ ) { @@ -370,9 +370,9 @@ bool KateDocManager::closeAllDocuments(bool closeURL) return res; } -QPtrList<Kate::Document> KateDocManager::modifiedDocumentList() { - QPtrList<Kate::Document> modified; - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { +TQPtrList<Kate::Document> KateDocManager::modifiedDocumentList() { + TQPtrList<Kate::Document> modified; + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { Kate::Document *doc = it.current(); if (doc->isModified()) { modified.append(doc); @@ -385,7 +385,7 @@ QPtrList<Kate::Document> KateDocManager::modifiedDocumentList() { bool KateDocManager::queryCloseDocuments(KateMainWindow *w) { uint docCount = m_docList.count(); - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { Kate::Document *doc = it.current(); @@ -402,7 +402,7 @@ bool KateDocManager::queryCloseDocuments(KateMainWindow *w) if (msgres==KMessageBox::Yes) { KEncodingFileDialog::Result r=KEncodingFileDialog::getSaveURLAndEncoding( - KTextEditor::encodingInterface(doc)->encoding(),QString::null,QString::null,w,i18n("Save As")); + KTextEditor::encodingInterface(doc)->encoding(),TQString::null,TQString::null,w,i18n("Save As")); doc->setEncoding( r.encoding ); @@ -439,23 +439,23 @@ bool KateDocManager::queryCloseDocuments(KateMainWindow *w) void KateDocManager::saveAll() { - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) if ( it.current()->isModified() && it.current()->views().count() ) ((Kate::View*)it.current()->views().first())->save(); } void KateDocManager::saveDocumentList (KConfig* config) { - QString prevGrp=config->group(); + TQString prevGrp=config->group(); config->setGroup ("Open Documents"); - QString grp = config->group(); + TQString grp = config->group(); config->writeEntry ("Count", m_docList.count()); int i=0; for ( Kate::Document *doc = m_docList.first(); doc; doc = m_docList.next() ) { - config->setGroup(QString("Document %1").arg(i)); + config->setGroup(TQString("Document %1").arg(i)); doc->writeSessionConfig(config); config->setGroup(grp); @@ -467,9 +467,9 @@ void KateDocManager::saveDocumentList (KConfig* config) void KateDocManager::restoreDocumentList (KConfig* config) { - QString prevGrp=config->group(); + TQString prevGrp=config->group(); config->setGroup ("Open Documents"); - QString grp = config->group(); + TQString grp = config->group(); unsigned int count = config->readUnsignedNumEntry("Count", 0); @@ -479,9 +479,9 @@ void KateDocManager::restoreDocumentList (KConfig* config) return; } - QProgressDialog *pd = new QProgressDialog( + TQProgressDialog *pd = new TQProgressDialog( i18n("Reopening files from the last session..."), - QString::null, + TQString::null, count, 0, "openprog"); @@ -492,7 +492,7 @@ void KateDocManager::restoreDocumentList (KConfig* config) bool first = true; for (unsigned int i=0; i < count; i++) { - config->setGroup(QString("Document %1").arg(i)); + config->setGroup(TQString("Document %1").arg(i)); Kate::Document *doc = 0; if (first) @@ -540,13 +540,13 @@ bool KateDocManager::loadMetaInfos(Kate::Document *doc, const KURL &url) if (!m_metaInfos->hasGroup(url.prettyURL())) return false; - QCString md5; + TQCString md5; bool ok = true; if (computeUrlMD5(url, md5)) { m_metaInfos->setGroup(url.prettyURL()); - QString old_md5 = m_metaInfos->readEntry("MD5"); + TQString old_md5 = m_metaInfos->readEntry("MD5"); if ((const char *)md5 == old_md5) doc->readSessionConfig(m_metaInfos); @@ -567,7 +567,7 @@ bool KateDocManager::loadMetaInfos(Kate::Document *doc, const KURL &url) */ void KateDocManager::saveMetaInfos(Kate::Document *doc) { - QCString md5; + TQCString md5; if (!m_saveMetaInfos) return; @@ -583,14 +583,14 @@ void KateDocManager::saveMetaInfos(Kate::Document *doc) m_metaInfos->setGroup(doc->url().prettyURL()); doc->writeSessionConfig(m_metaInfos); m_metaInfos->writeEntry("MD5", (const char *)md5); - m_metaInfos->writeEntry("Time", QDateTime::currentDateTime()); + m_metaInfos->writeEntry("Time", TQDateTime::currentDateTime()); m_metaInfos->sync(); } } -bool KateDocManager::computeUrlMD5(const KURL &url, QCString &result) +bool KateDocManager::computeUrlMD5(const KURL &url, TQCString &result) { - QFile f(url.path()); + TQFile f(url.path()); if (f.open(IO_ReadOnly)) { diff --git a/kate/app/katedocmanager.h b/kate/app/katedocmanager.h index 45931b655..b35d0a65f 100644 --- a/kate/app/katedocmanager.h +++ b/kate/app/katedocmanager.h @@ -25,14 +25,14 @@ #include <kate/document.h> -#include <qdatetime.h> -#include <qguardedptr.h> -#include <qptrlist.h> -#include <qobject.h> -#include <qptrdict.h> -#include <qintdict.h> -#include <qmap.h> -#include <qpair.h> +#include <tqdatetime.h> +#include <tqguardedptr.h> +#include <tqptrlist.h> +#include <tqobject.h> +#include <tqptrdict.h> +#include <tqintdict.h> +#include <tqmap.h> +#include <tqpair.h> namespace KParts { class Factory; } @@ -52,14 +52,14 @@ class KateDocumentInfo unsigned char modifiedOnDiscReason; }; -typedef QPair<KURL,QDateTime> TPair; +typedef QPair<KURL,TQDateTime> TPair; class KateDocManager : public QObject { Q_OBJECT public: - KateDocManager (QObject *parent); + KateDocManager (TQObject *parent); ~KateDocManager (); static KateDocManager *self (); @@ -92,16 +92,16 @@ class KateDocManager : public QObject uint documents (); - QPtrList<Kate::Document> &documentList () { return m_docList; }; + TQPtrList<Kate::Document> &documentList () { return m_docList; }; - Kate::Document *openURL(const KURL&,const QString &encoding=QString::null,uint *id =0,bool isTempFile=false); + Kate::Document *openURL(const KURL&,const TQString &encoding=TQString::null,uint *id =0,bool isTempFile=false); bool closeDocument(class Kate::Document *,bool closeURL=true); bool closeDocument(uint); bool closeDocumentWithID(uint); bool closeAllDocuments(bool closeURL=true); - QPtrList<Kate::Document> modifiedDocumentList(); + TQPtrList<Kate::Document> modifiedDocumentList(); bool queryCloseDocuments(KateMainWindow *w); void saveDocumentList (class KConfig *config); @@ -135,14 +135,14 @@ class KateDocManager : public QObject private: bool loadMetaInfos(Kate::Document *doc, const KURL &url); void saveMetaInfos(Kate::Document *doc); - bool computeUrlMD5(const KURL &url, QCString &result); + bool computeUrlMD5(const KURL &url, TQCString &result); Kate::DocumentManager *m_documentManager; - QPtrList<Kate::Document> m_docList; - QIntDict<Kate::Document> m_docDict; - QPtrDict<KateDocumentInfo> m_docInfos; - QMap<uint,TPair> m_tempFiles; - QGuardedPtr<Kate::Document> m_currentDoc; + TQPtrList<Kate::Document> m_docList; + TQIntDict<Kate::Document> m_docDict; + TQPtrDict<KateDocumentInfo> m_docInfos; + TQMap<uint,TPair> m_tempFiles; + TQGuardedPtr<Kate::Document> m_currentDoc; KConfig *m_metaInfos; bool m_saveMetaInfos; int m_daysMetaInfos; diff --git a/kate/app/katedocmanageriface.cpp b/kate/app/katedocmanageriface.cpp index 9c2eabc03..5ef01a1df 100644 --- a/kate/app/katedocmanageriface.cpp +++ b/kate/app/katedocmanageriface.cpp @@ -83,7 +83,7 @@ DCOPRef KateDocManagerDCOPIface::documentWithID (uint id) return DCOPRef (obj); } -DCOPRef KateDocManagerDCOPIface::openURL (KURL url, QString encoding) +DCOPRef KateDocManagerDCOPIface::openURL (KURL url, TQString encoding) { Kate::Document *doc = m_dm->openURL (url, encoding); diff --git a/kate/app/katedocmanageriface.h b/kate/app/katedocmanageriface.h index 7a2cb5506..353818c03 100644 --- a/kate/app/katedocmanageriface.h +++ b/kate/app/katedocmanageriface.h @@ -48,7 +48,7 @@ class KateDocManagerDCOPIface : public DCOPObject uint documents (); - DCOPRef openURL (KURL url, QString encoding); + DCOPRef openURL (KURL url, TQString encoding); bool closeDocument (uint n); diff --git a/kate/app/kateexternaltools.cpp b/kate/app/kateexternaltools.cpp index 50c07709b..6680e26a4 100644 --- a/kate/app/kateexternaltools.cpp +++ b/kate/app/kateexternaltools.cpp @@ -44,19 +44,19 @@ #include <kpopupmenu.h> #include <kdebug.h> -#include <qbitmap.h> -#include <qcombobox.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlistbox.h> -#include <qmap.h> -#include <qregexp.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qwhatsthis.h> +#include <tqbitmap.h> +#include <tqcombobox.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqmap.h> +#include <tqregexp.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqwhatsthis.h> #include <stdlib.h> #include <unistd.h> @@ -65,13 +65,13 @@ KateExternalToolsCommand *KateExternalToolsCommand::s_self=0; //BEGIN KateExternalTool -KateExternalTool::KateExternalTool( const QString &name, - const QString &command, - const QString &icon, - const QString &tryexec, - const QStringList &mimetypes, - const QString &acname, - const QString &cmdname, +KateExternalTool::KateExternalTool( const TQString &name, + const TQString &command, + const TQString &icon, + const TQString &tryexec, + const TQStringList &mimetypes, + const TQString &acname, + const TQString &cmdname, int save ) : name ( name ), command ( command ), @@ -90,12 +90,12 @@ bool KateExternalTool::checkExec() { // if tryexec is empty, it is the first word of command if ( tryexec.isEmpty() ) - tryexec = command.section( " ", 0, 0, QString::SectionSkipEmpty ); + tryexec = command.section( " ", 0, 0, TQString::SectionSkipEmpty ); // NOTE this code is modified taken from kdesktopfile.cpp, from KDesktopFile::tryExec() if (!tryexec.isEmpty()) { if (tryexec[0] == '/') { - if (::access(QFile::encodeName(tryexec), R_OK | X_OK)) + if (::access(TQFile::encodeName(tryexec), R_OK | X_OK)) return false; m_exec = tryexec; @@ -103,13 +103,13 @@ bool KateExternalTool::checkExec() // !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!! // Environment PATH may contain filenames in 8bit locale cpecified // encoding (Like a filenames). - QStringList dirs = QStringList::split(':', QFile::decodeName(::getenv("PATH"))); - QStringList::Iterator it(dirs.begin()); + TQStringList dirs = TQStringList::split(':', TQFile::decodeName(::getenv("PATH"))); + TQStringList::Iterator it(dirs.begin()); bool match = false; for (; it != dirs.end(); ++it) { - QString fName = *it + "/" + tryexec; - if (::access(QFile::encodeName(fName), R_OK | X_OK) == 0) + TQString fName = *it + "/" + tryexec; + if (::access(TQFile::encodeName(fName), R_OK | X_OK) == 0) { match = true; m_exec = fName; @@ -125,7 +125,7 @@ bool KateExternalTool::checkExec() return false; } -bool KateExternalTool::valid( const QString &mt ) const +bool KateExternalTool::valid( const TQString &mt ) const { return mimetypes.isEmpty() || mimetypes.contains( mt ); } @@ -137,7 +137,7 @@ KateExternalToolsCommand::KateExternalToolsCommand() : Kate::Command() { reload(); } -QStringList KateExternalToolsCommand::cmds () { +TQStringList KateExternalToolsCommand::cmds () { return m_list; } @@ -153,10 +153,10 @@ void KateExternalToolsCommand::reload () { KConfig config("externaltools", false, false, "appdata"); config.setGroup("Global"); - QStringList tools = config.readListEntry("tools"); + TQStringList tools = config.readListEntry("tools"); - for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) + for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) { if ( *it == "---" ) continue; @@ -185,8 +185,8 @@ void KateExternalToolsCommand::reload () { else m_inited=true; } -bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QString &) { - QWidget *wv=dynamic_cast<QWidget*>(view); +bool KateExternalToolsCommand::exec (Kate::View *view, const TQString &cmd, TQString &) { + TQWidget *wv=dynamic_cast<TQWidget*>(view); if (!wv) { // kdDebug(13001)<<"KateExternalToolsCommand::exec: Could not get view widget"<<endl; return false; @@ -197,7 +197,7 @@ bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QStri return false; } // kdDebug(13001)<<"cmd="<<cmd.stripWhiteSpace()<<endl; - QString actionName=m_map[cmd.stripWhiteSpace()]; + TQString actionName=m_map[cmd.stripWhiteSpace()]; if (actionName.isEmpty()) return false; // kdDebug(13001)<<"actionName is not empty:"<<actionName<<endl; KateExternalToolsMenuAction *a= @@ -211,13 +211,13 @@ bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QStri return true; } -bool KateExternalToolsCommand::help (Kate::View *, const QString &, QString &) { +bool KateExternalToolsCommand::help (Kate::View *, const TQString &, TQString &) { return false; } //END KateExternalToolsCommand //BEGIN KateExternalToolAction -KateExternalToolAction::KateExternalToolAction( QObject *parent, +KateExternalToolAction::KateExternalToolAction( TQObject *parent, const char *name, KateExternalTool *t) : KAction( parent, name ), tool ( t ) @@ -226,10 +226,10 @@ KateExternalToolAction::KateExternalToolAction( QObject *parent, if ( ! t->icon.isEmpty() ) setIconSet( SmallIconSet( t->icon ) ); - connect( this ,SIGNAL(activated()), this, SLOT(slotRun()) ); + connect( this ,TQT_SIGNAL(activated()), this, TQT_SLOT(slotRun()) ); } -bool KateExternalToolAction::expandMacro( const QString &str, QStringList &ret ) +bool KateExternalToolAction::expandMacro( const TQString &str, TQStringList &ret ) { KateMainWindow *mw = (KateMainWindow*)parent()->parent(); @@ -244,9 +244,9 @@ bool KateExternalToolAction::expandMacro( const QString &str, QStringList &ret ) else if ( str == "filename" ) ret += mw->activeDocumentUrl().fileName(); else if ( str == "line" ) // cursor line of current doc - ret += QString::number( view->cursorLine() ); + ret += TQString::number( view->cursorLine() ); else if ( str == "col" ) // cursor col of current doc - ret += QString::number( view->cursorColumn() ); + ret += TQString::number( view->cursorColumn() ); else if ( str == "selection" ) // selection of current doc if any ret += view->getDoc()->selection(); else if ( str == "text" ) // text of current doc @@ -268,7 +268,7 @@ void KateExternalToolAction::slotRun() { // expand the macros in command if any, // and construct a command with an absolute path - QString cmd = tool->command; + TQString cmd = tool->command; if ( ! expandMacrosShellQuote( cmd ) ) { @@ -291,8 +291,8 @@ void KateExternalToolAction::slotRun() //END KateExternalToolAction //BEGIN KateExternalToolsMenuAction -KateExternalToolsMenuAction::KateExternalToolsMenuAction( const QString &text, - QObject *parent, +KateExternalToolsMenuAction::KateExternalToolsMenuAction( const TQString &text, + TQObject *parent, const char* name, KateMainWindow *mw ) : KActionMenu( text, parent, name ), @@ -301,7 +301,7 @@ KateExternalToolsMenuAction::KateExternalToolsMenuAction( const QString &text, m_actionCollection = new KActionCollection( mainwindow ); - connect(KateDocManager::self(),SIGNAL(documentChanged()),this,SLOT(slotDocumentChanged())); + connect(KateDocManager::self(),TQT_SIGNAL(documentChanged()),this,TQT_SLOT(slotDocumentChanged())); reload(); } @@ -314,21 +314,21 @@ void KateExternalToolsMenuAction::reload() // load all the tools, and create a action for each of them KConfig *config = new KConfig( "externaltools", false, false, "appdata" ); config->setGroup( "Global" ); - QStringList tools = config->readListEntry( "tools" ); + TQStringList tools = config->readListEntry( "tools" ); // if there are tools that are present but not explicitly removed, // add them to the end of the list config->setReadDefaults( true ); - QStringList dtools = config->readListEntry( "tools" ); + TQStringList dtools = config->readListEntry( "tools" ); int gver = config->readNumEntry( "version", 1 ); config->setReadDefaults( false ); int ver = config->readNumEntry( "version" ); if ( ver <= gver ) { - QStringList removed = config->readListEntry( "removed" ); + TQStringList removed = config->readListEntry( "removed" ); bool sepadded = false; - for (QStringList::iterator itg = dtools.begin(); itg != dtools.end(); ++itg ) + for (TQStringList::iterator itg = dtools.begin(); itg != dtools.end(); ++itg ) { if ( ! tools.contains( *itg ) && ! removed.contains( *itg ) ) @@ -347,7 +347,7 @@ void KateExternalToolsMenuAction::reload() config->writeEntry( "version", gver ); } - for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) + for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) { if ( *it == "---" ) { @@ -383,8 +383,8 @@ void KateExternalToolsMenuAction::slotDocumentChanged() Kate::DocumentExt *de = documentExt( KateDocManager::self()->activeDocument() ); if ( de ) { - QString mt = de->mimeType(); - QStringList l; + TQString mt = de->mimeType(); + TQStringList l; bool b; KActionPtrList actions = m_actionCollection->actions(); @@ -404,14 +404,14 @@ void KateExternalToolsMenuAction::slotDocumentChanged() //BEGIN ToolItem /** - * This is a QListBoxItem, that has a KateExternalTool. The text is the Name + * This is a TQListBoxItem, that has a KateExternalTool. The text is the Name * of the tool. */ class ToolItem : public QListBoxPixmap { public: - ToolItem( QListBox *lb, const QPixmap &icon, KateExternalTool *tool ) - : QListBoxPixmap( lb, icon, tool->name ), + ToolItem( TQListBox *lb, const TQPixmap &icon, KateExternalTool *tool ) + : TQListBoxPixmap( lb, icon, tool->name ), tool ( tool ) {;} @@ -423,26 +423,26 @@ class ToolItem : public QListBoxPixmap //BEGIN KateExternalToolServiceEditor KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool *tool, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n("Edit External Tool"), KDialogBase::Ok|KDialogBase::Cancel ), tool( tool ) { // create a entry for each property // fill in the values from the service if available - QWidget *w = new QWidget( this ); + TQWidget *w = new TQWidget( this ); setMainWidget( w ); - QGridLayout *lo = new QGridLayout( w ); + TQGridLayout *lo = new TQGridLayout( w ); lo->setSpacing( KDialogBase::spacingHint() ); - QLabel *l; + TQLabel *l; - leName = new QLineEdit( w ); + leName = new TQLineEdit( w ); lo->addWidget( leName, 1, 2 ); - l = new QLabel( leName, i18n("&Label:"), w ); + l = new TQLabel( leName, i18n("&Label:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 1, 1 ); if ( tool ) leName->setText( tool->name ); - QWhatsThis::add( leName, i18n( + TQWhatsThis::add( leName, i18n( "The name will be displayed in the 'Tools->External' menu") ); btnIcon = new KIconButton( w ); @@ -451,13 +451,13 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * if ( tool && !tool->icon.isEmpty() ) btnIcon->setIcon( tool->icon ); - teCommand = new QTextEdit( w ); + teCommand = new TQTextEdit( w ); lo->addMultiCellWidget( teCommand, 2, 2, 2, 3 ); - l = new QLabel( teCommand, i18n("S&cript:"), w ); + l = new TQLabel( teCommand, i18n("S&cript:"), w ); l->setAlignment( Qt::AlignTop|Qt::AlignRight ); lo->addWidget( l, 2, 1 ); if ( tool ) teCommand->setText( tool->command ); - QWhatsThis::add( teCommand, i18n( + TQWhatsThis::add( teCommand, i18n( "<p>The script to execute to invoke the tool. The script is passed " "to /bin/sh for execution. The following macros " "will be expanded:</p>" @@ -474,57 +474,57 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * "<li><code>%text</code> - the text of the current document.</ul>" ) ); - leExecutable = new QLineEdit( w ); + leExecutable = new TQLineEdit( w ); lo->addMultiCellWidget( leExecutable, 3, 3, 2, 3 ); - l = new QLabel( leExecutable, i18n("&Executable:"), w ); + l = new TQLabel( leExecutable, i18n("&Executable:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 3, 1 ); if ( tool ) leExecutable->setText( tool->tryexec ); - QWhatsThis::add( leExecutable, i18n( + TQWhatsThis::add( leExecutable, i18n( "The executable used by the command. This is used to check if a tool " "should be displayed; if not set, the first word of <em>command</em> " "will be used.") ); - leMimetypes = new QLineEdit( w ); + leMimetypes = new TQLineEdit( w ); lo->addWidget( leMimetypes, 4, 2 ); - l = new QLabel( leMimetypes, i18n("&Mime types:"), w ); + l = new TQLabel( leMimetypes, i18n("&Mime types:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 4, 1 ); if ( tool ) leMimetypes->setText( tool->mimetypes.join("; ") ); - QWhatsThis::add( leMimetypes, i18n( + TQWhatsThis::add( leMimetypes, i18n( "A semicolon-separated list of mime types for which this tool should " "be available; if this is left empty, the tool is always available. " "To choose from known mimetypes, press the button on the right.") ); - QToolButton *btnMTW = new QToolButton(w); + TQToolButton *btnMTW = new TQToolButton(w); lo->addWidget( btnMTW, 4, 3 ); - btnMTW->setIconSet(QIconSet(SmallIcon("wizard"))); - connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg())); - QWhatsThis::add( btnMTW, i18n( + btnMTW->setIconSet(TQIconSet(SmallIcon("wizard"))); + connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg())); + TQWhatsThis::add( btnMTW, i18n( "Click for a dialog that can help you creating a list of mimetypes.") ); - cmbSave = new QComboBox(w); + cmbSave = new TQComboBox(w); lo->addMultiCellWidget( cmbSave, 5, 5, 2, 3 ); - l = new QLabel( cmbSave, i18n("&Save:"), w ); + l = new TQLabel( cmbSave, i18n("&Save:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 5, 1 ); - QStringList sl; + TQStringList sl; sl << i18n("None") << i18n("Current Document") << i18n("All Documents"); cmbSave->insertStringList( sl ); if ( tool ) cmbSave->setCurrentItem( tool->save ); - QWhatsThis::add( cmbSave, i18n( + TQWhatsThis::add( cmbSave, i18n( "You can elect to save the current or all [modified] documents prior to " "running the command. This is helpful if you want to pass URLs to " "an application like, for example, an FTP client.") ); - leCmdLine = new QLineEdit( w ); + leCmdLine = new TQLineEdit( w ); lo->addMultiCellWidget( leCmdLine, 6, 6, 2, 3 ); - l = new QLabel( leCmdLine, i18n("&Command line name:"), w ); + l = new TQLabel( leCmdLine, i18n("&Command line name:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 6, 1 ); if ( tool ) leCmdLine->setText( tool->cmdname ); - QWhatsThis::add( leCmdLine, i18n( + TQWhatsThis::add( leCmdLine, i18n( "If you specify a name here, you can invoke the command from the view " "command lines with exttool-the_name_you_specified_here. " "Please do not use spaces or tabs in the name.")); @@ -545,8 +545,8 @@ void KateExternalToolServiceEditor::slotOk() void KateExternalToolServiceEditor::showMTDlg() { - QString text = i18n("Select the MimeTypes for which to enable this tool."); - QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimetypes->text() ); + TQString text = i18n("Select the MimeTypes for which to enable this tool."); + TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimetypes->text() ); KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this ); if ( d.exec() == KDialogBase::Accepted ) { leMimetypes->setText( d.chooser()->mimeTypes().join(";") ); @@ -555,41 +555,41 @@ void KateExternalToolServiceEditor::showMTDlg() //END KateExternalToolServiceEditor //BEGIN KateExternalToolsConfigWidget -KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( QWidget *parent, const char* name ) +KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( TQWidget *parent, const char* name ) : Kate::ConfigPage( parent, name ), m_changed( false ) { - QGridLayout *lo = new QGridLayout( this, 5, 5, 0, KDialog::spacingHint() ); + TQGridLayout *lo = new TQGridLayout( this, 5, 5, 0, KDialog::spacingHint() ); lbTools = new KListBox( this ); lo->addMultiCellWidget( lbTools, 1, 4, 0, 3 ); - connect( lbTools, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) ); + connect( lbTools, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); - btnNew = new QPushButton( i18n("&New..."), this ); + btnNew = new TQPushButton( i18n("&New..."), this ); lo->addWidget( btnNew, 5, 0 ); - connect( btnNew, SIGNAL(clicked()), this, SLOT(slotNew()) ); + connect( btnNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()) ); - btnRemove = new QPushButton( i18n("&Remove"), this ); + btnRemove = new TQPushButton( i18n("&Remove"), this ); lo->addWidget( btnRemove, 5, 2 ); - connect( btnRemove, SIGNAL(clicked()), this, SLOT(slotRemove()) ); + connect( btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemove()) ); - btnEdit = new QPushButton( i18n("&Edit..."), this ); + btnEdit = new TQPushButton( i18n("&Edit..."), this ); lo->addWidget( btnEdit, 5, 1 ); - connect( btnEdit, SIGNAL(clicked()), this, SLOT(slotEdit()) ); + connect( btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()) ); - QPushButton *b = new QPushButton( i18n("Insert &Separator"), this ); + TQPushButton *b = new TQPushButton( i18n("Insert &Separator"), this ); lo->addWidget( b, 5, 3 ); - connect( b, SIGNAL(clicked()), this, SLOT(slotInsertSeparator()) ); + connect( b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInsertSeparator()) ); - btnMoveUp = new QPushButton( SmallIconSet("up"), "", this ); + btnMoveUp = new TQPushButton( SmallIconSet("up"), "", this ); lo->addWidget( btnMoveUp, 2, 4 ); - connect( btnMoveUp, SIGNAL(clicked()), this, SLOT(slotMoveUp()) ); + connect( btnMoveUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveUp()) ); - btnMoveDwn = new QPushButton( SmallIconSet("down"), "", this ); + btnMoveDwn = new TQPushButton( SmallIconSet("down"), "", this ); lo->addWidget( btnMoveDwn, 3, 4 ); - connect( btnMoveDwn, SIGNAL(clicked()), this, SLOT(slotMoveDown()) ); + connect( btnMoveDwn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDown()) ); - connect( lbTools, SIGNAL( doubleClicked ( QListBoxItem * ) ), this, SLOT( slotEdit() ) ); + connect( lbTools, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), this, TQT_SLOT( slotEdit() ) ); lo->setRowStretch( 1, 1 ); lo->setRowStretch( 4, 1 ); @@ -598,7 +598,7 @@ KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( QWidget *parent, c lo->setColStretch( 2, 1 ); - QWhatsThis::add( lbTools, i18n( + TQWhatsThis::add( lbTools, i18n( "This list shows all the configured tools, represented by their menu text.") ); config = new KConfig("externaltools", false, false, "appdata"); @@ -618,13 +618,13 @@ void KateExternalToolsConfigWidget::reload() // load the files from a KConfig config->setGroup( "Global" ); - QStringList tools = config->readListEntry("tools"); + TQStringList tools = config->readListEntry("tools"); - for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) + for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) { if ( *it == "---" ) { - new QListBoxText( lbTools, "---" ); + new TQListBoxText( lbTools, "---" ); } else { @@ -647,9 +647,9 @@ void KateExternalToolsConfigWidget::reload() m_changed = false; } -QPixmap KateExternalToolsConfigWidget::blankIcon() +TQPixmap KateExternalToolsConfigWidget::blankIcon() { - QPixmap pm( KIcon::SizeSmall, KIcon::SizeSmall ); + TQPixmap pm( KIcon::SizeSmall, KIcon::SizeSmall ); pm.fill(); pm.setMask( pm.createHeuristicMask() ); return pm; @@ -663,7 +663,7 @@ void KateExternalToolsConfigWidget::apply() // save a new list // save each item - QStringList tools; + TQStringList tools; for ( uint i = 0; i < lbTools->count(); i++ ) { if ( lbTools->text( i ) == "---" ) @@ -693,18 +693,18 @@ void KateExternalToolsConfigWidget::apply() // add the group names to the list of removed items. if ( m_removed.count() ) { - for ( QStringList::iterator it = m_removed.begin(); it != m_removed.end(); ++it ) + for ( TQStringList::iterator it = m_removed.begin(); it != m_removed.end(); ++it ) { if ( config->hasGroup( *it ) ) config->deleteGroup( *it ); } - QStringList removed = config->readListEntry( "removed" ); + TQStringList removed = config->readListEntry( "removed" ); removed += m_removed; // clean up the list of removed items, so that it does not contain // non-existing groups (we can't remove groups from a non-owned global file). config->sync(); - QStringList::iterator it1 = removed.begin(); + TQStringList::iterator it1 = removed.begin(); while( it1 != removed.end() ) { if ( ! config->hasGroup( *it1 ) ) @@ -741,11 +741,11 @@ void KateExternalToolsConfigWidget::slotNew() editor.teCommand->text(), editor.btnIcon->icon(), editor.leExecutable->text(), - QStringList::split( QRegExp("\\s*;\\s*"), editor.leMimetypes->text() ) ); + TQStringList::split( TQRegExp("\\s*;\\s*"), editor.leMimetypes->text() ) ); // This is sticky, it does not change again, so that shortcuts sticks // TODO check for dups - t->acname = "externaltool_" + QString(t->name).replace( QRegExp("\\W+"), "" ); + t->acname = "externaltool_" + TQString(t->name).replace( TQRegExp("\\W+"), "" ); new ToolItem ( lbTools, t->icon.isEmpty() ? blankIcon() : SmallIcon( t->icon ), t ); @@ -787,7 +787,7 @@ void KateExternalToolsConfigWidget::slotEdit() t->command = editor.teCommand->text(); t->icon = editor.btnIcon->icon(); t->tryexec = editor.leExecutable->text(); - t->mimetypes = QStringList::split( QRegExp("\\s*;\\s*"), editor.leMimetypes->text() ); + t->mimetypes = TQStringList::split( TQRegExp("\\s*;\\s*"), editor.leMimetypes->text() ); t->save = editor.cmbSave->currentItem(); //if the icon has changed or name changed, I have to renew the listbox item :S @@ -817,7 +817,7 @@ void KateExternalToolsConfigWidget::slotInsertSeparator() void KateExternalToolsConfigWidget::slotMoveUp() { // move the current item in the listbox upwards if possible - QListBoxItem *item = lbTools->selectedItem(); + TQListBoxItem *item = lbTools->selectedItem(); if ( ! item ) return; int idx = lbTools->index( item ); @@ -833,7 +833,7 @@ void KateExternalToolsConfigWidget::slotMoveUp() else // a separator! { lbTools->removeItem( idx ); - lbTools->insertItem( new QListBoxText( 0, "---" ), idx-1 ); + lbTools->insertItem( new TQListBoxText( 0, "---" ), idx-1 ); } lbTools->setCurrentItem( idx - 1 ); @@ -845,7 +845,7 @@ void KateExternalToolsConfigWidget::slotMoveUp() void KateExternalToolsConfigWidget::slotMoveDown() { // move the current item in the listbox downwards if possible - QListBoxItem *item = lbTools->selectedItem(); + TQListBoxItem *item = lbTools->selectedItem(); if ( ! item ) return; uint idx = lbTools->index( item ); @@ -861,7 +861,7 @@ void KateExternalToolsConfigWidget::slotMoveDown() else // a separator! { lbTools->removeItem( idx ); - lbTools->insertItem( new QListBoxText( 0, "---" ), idx+1 ); + lbTools->insertItem( new TQListBoxText( 0, "---" ), idx+1 ); } lbTools->setCurrentItem( idx+1 ); diff --git a/kate/app/kateexternaltools.h b/kate/app/kateexternaltools.h index 4a5ecdacc..507e1cfca 100644 --- a/kate/app/kateexternaltools.h +++ b/kate/app/kateexternaltools.h @@ -28,7 +28,7 @@ #include <kdialogbase.h> #include <kate/document.h> #include <kmacroexpander.h> -#include <qpixmap.h> +#include <tqpixmap.h> /** * The external tools action @@ -57,7 +57,7 @@ class KateExternalToolsMenuAction : public KActionMenu Q_OBJECT public: - KateExternalToolsMenuAction( const QString &text=QString::null, QObject *parent=0, const char* name=0, class KateMainWindow *mw=0 ); + KateExternalToolsMenuAction( const TQString &text=TQString::null, TQObject *parent=0, const char* name=0, class KateMainWindow *mw=0 ); ~KateExternalToolsMenuAction() {}; /** @@ -82,10 +82,10 @@ class KateExternalToolAction : public KAction, public KWordMacroExpander { Q_OBJECT public: - KateExternalToolAction( QObject *parent, const char *name, class KateExternalTool *t ); + KateExternalToolAction( TQObject *parent, const char *name, class KateExternalTool *t ); ~KateExternalToolAction(); protected: - virtual bool expandMacro( const QString &str, QStringList &ret ); + virtual bool expandMacro( const TQString &str, TQStringList &ret ); private slots: void slotRun(); @@ -100,30 +100,30 @@ class KateExternalToolAction : public KAction, public KWordMacroExpander class KateExternalTool { public: - KateExternalTool( const QString &name=QString::null, - const QString &command=QString::null, - const QString &icon=QString::null, - const QString &tryexec=QString::null, - const QStringList &mimetypes=QStringList(), - const QString &acname=QString::null, - const QString &cmdname=QString::null, + KateExternalTool( const TQString &name=TQString::null, + const TQString &command=TQString::null, + const TQString &icon=TQString::null, + const TQString &tryexec=TQString::null, + const TQStringList &mimetypes=TQStringList(), + const TQString &acname=TQString::null, + const TQString &cmdname=TQString::null, int save=0 ); ~KateExternalTool() {}; - QString name; ///< The name used in the menu. - QString command; ///< The command to execute. - QString icon; ///< the icon to use in the menu. - QString tryexec; ///< The name or path of the executable. - QStringList mimetypes; ///< Optional list of mimetypes for which this action is valid. + TQString name; ///< The name used in the menu. + TQString command; ///< The command to execute. + TQString icon; ///< the icon to use in the menu. + TQString tryexec; ///< The name or path of the executable. + TQStringList mimetypes; ///< Optional list of mimetypes for which this action is valid. bool hasexec; ///< This is set by the constructor by calling checkExec(), if a value is present. - QString acname; ///< The name for the action. This is generated first time the action is is created. - QString cmdname; ///< The name for the commandline. + TQString acname; ///< The name for the action. This is generated first time the action is is created. + TQString cmdname; ///< The name for the commandline. int save; ///< We can save documents prior to activating the tool command: 0 = nothing, 1 = current document, 2 = all documents. /** * @return true if mimetypes is empty, or the @p mimetype matches. */ - bool valid( const QString &mimetype ) const; + bool valid( const TQString &mimetype ) const; /** * @return true if "tryexec" exists and has the executable bit set, or is * empty. @@ -132,7 +132,7 @@ class KateExternalTool bool checkExec(); private: - QString m_exec; ///< The fully qualified path of the executable. + TQString m_exec; ///< The fully qualified path of the executable. }; /** @@ -144,7 +144,7 @@ class KateExternalToolsConfigWidget : public Kate::ConfigPage { Q_OBJECT public: - KateExternalToolsConfigWidget( QWidget *parent, const char* name); + KateExternalToolsConfigWidget( TQWidget *parent, const char* name); virtual ~KateExternalToolsConfigWidget(); virtual void apply(); @@ -164,12 +164,12 @@ class KateExternalToolsConfigWidget : public Kate::ConfigPage void slotSelectionChanged(); private: - QPixmap blankIcon(); + TQPixmap blankIcon(); - QStringList m_removed; + TQStringList m_removed; class KListBox *lbTools; - class QPushButton *btnNew, *btnRemove, *btnEdit, *btnMoveUp, *btnMoveDwn; + class TQPushButton *btnNew, *btnRemove, *btnEdit, *btnMoveUp, *btnMoveDwn; class KConfig *config; @@ -186,13 +186,13 @@ class KateExternalToolsConfigWidget : public Kate::ConfigPage static KateExternalToolsCommand *self(); void reload(); public: - virtual QStringList cmds (); - virtual bool exec (Kate::View *view, const QString &cmd, QString &msg); - virtual bool help (Kate::View *view, const QString &cmd, QString &msg); + virtual TQStringList cmds (); + virtual bool exec (Kate::View *view, const TQString &cmd, TQString &msg); + virtual bool help (Kate::View *view, const TQString &cmd, TQString &msg); private: static KateExternalToolsCommand *s_self; - QStringList m_list; - QMap<QString,QString> m_map; + TQStringList m_list; + TQMap<TQString,TQString> m_map; bool m_inited; }; @@ -206,12 +206,12 @@ class KateExternalToolServiceEditor : public KDialogBase public: KateExternalToolServiceEditor( KateExternalTool *tool=0, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); - class QLineEdit *leName, *leExecutable, *leMimetypes,*leCmdLine; - class QTextEdit *teCommand; + class TQLineEdit *leName, *leExecutable, *leMimetypes,*leCmdLine; + class TQTextEdit *teCommand; class KIconButton *btnIcon; - class QComboBox *cmbSave; + class TQComboBox *cmbSave; private slots: /** diff --git a/kate/app/katefilelist.cpp b/kate/app/katefilelist.cpp index 8c350d45a..47c8aa75b 100644 --- a/kate/app/katefilelist.cpp +++ b/kate/app/katefilelist.cpp @@ -26,17 +26,17 @@ #include "kateviewmanager.h" #include "katemainwindow.h" -#include <qapplication.h> -#include <qpainter.h> -#include <qpopupmenu.h> -#include <qheader.h> -#include <qcolor.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qwhatsthis.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpopupmenu.h> +#include <tqheader.h> +#include <tqcolor.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> #include <kiconloader.h> #include <kconfig.h> @@ -54,16 +54,16 @@ class ToolTip : public QToolTip { public: - ToolTip( QWidget *parent, KateFileList *lv ) - : QToolTip( parent ), + ToolTip( TQWidget *parent, KateFileList *lv ) + : TQToolTip( parent ), m_listView( lv ) { } virtual ~ToolTip() {}; - void maybeTip( const QPoint &pos ) + void maybeTip( const TQPoint &pos ) { - QListViewItem *i = m_listView->itemAt( pos ); + TQListViewItem *i = m_listView->itemAt( pos ); if ( ! i ) return; KateFileListItem *item = ((KateFileListItem*)i); @@ -82,7 +82,7 @@ class ToolTip : public QToolTip //BEGIN KateFileList KateFileList::KateFileList (KateMainWindow *main, KateViewManager *_viewManager, - QWidget * parent, const char * name ) + TQWidget * parent, const char * name ) : KListView (parent, name) , m_sort( KateFileList::sortByID ) { @@ -90,18 +90,18 @@ KateFileList::KateFileList (KateMainWindow *main, m_tooltip = new ToolTip( viewport(), this ); // default colors - m_viewShade = QColor( 51, 204, 255 ); - m_editShade = QColor( 255, 102, 153 ); + m_viewShade = TQColor( 51, 204, 255 ); + m_editShade = TQColor( 255, 102, 153 ); m_enableBgShading = false; - setFocusPolicy ( QWidget::NoFocus ); + setFocusPolicy ( TQWidget::NoFocus ); viewManager = _viewManager; header()->hide(); addColumn("Document Name"); - setSelectionMode( QListView::Single ); + setSelectionMode( TQListView::Single ); setSorting( 0, true ); setShowToolTips( false ); @@ -113,18 +113,18 @@ KateFileList::KateFileList (KateMainWindow *main, slotModChanged (KateDocManager::self()->document(i)); } - connect(KateDocManager::self(),SIGNAL(documentCreated(Kate::Document *)), - this,SLOT(slotDocumentCreated(Kate::Document *))); - connect(KateDocManager::self(),SIGNAL(documentDeleted(uint)), - this,SLOT(slotDocumentDeleted(uint))); + connect(KateDocManager::self(),TQT_SIGNAL(documentCreated(Kate::Document *)), + this,TQT_SLOT(slotDocumentCreated(Kate::Document *))); + connect(KateDocManager::self(),TQT_SIGNAL(documentDeleted(uint)), + this,TQT_SLOT(slotDocumentDeleted(uint))); // don't Honour KDE single/double click setting, this files are already open, // no need for hassle of considering double-click - connect(this,SIGNAL(selectionChanged(QListViewItem *)), - this,SLOT(slotActivateView(QListViewItem *))); - connect(viewManager,SIGNAL(viewChanged()), this,SLOT(slotViewChanged())); - connect(this,SIGNAL(contextMenuRequested( QListViewItem *, const QPoint &, int )), - this,SLOT(slotMenu ( QListViewItem *, const QPoint &, int ))); + connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this,TQT_SLOT(slotActivateView(TQListViewItem *))); + connect(viewManager,TQT_SIGNAL(viewChanged()), this,TQT_SLOT(slotViewChanged())); + connect(this,TQT_SIGNAL(contextMenuRequested( TQListViewItem *, const TQPoint &, int )), + this,TQT_SLOT(slotMenu ( TQListViewItem *, const TQPoint &, int ))); } KateFileList::~KateFileList () @@ -134,14 +134,14 @@ KateFileList::~KateFileList () void KateFileList::setupActions () { - windowNext = KStdAction::back(this, SLOT(slotPrevDocument()), m_main->actionCollection()); - windowPrev = KStdAction::forward(this, SLOT(slotNextDocument()), m_main->actionCollection()); + windowNext = KStdAction::back(this, TQT_SLOT(slotPrevDocument()), m_main->actionCollection()); + windowPrev = KStdAction::forward(this, TQT_SLOT(slotNextDocument()), m_main->actionCollection()); sortAction = new KSelectAction( i18n("Sort &By"), 0, m_main->actionCollection(), "filelist_sortby" ); - QStringList l; + TQStringList l; l << i18n("Opening Order") << i18n("Document Name") << i18n("URL"); sortAction->setItems( l ); - connect( sortAction, SIGNAL(activated(int)), this, SLOT(setSortType(int)) ); + connect( sortAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setSortType(int)) ); } void KateFileList::updateActions () @@ -150,7 +150,7 @@ void KateFileList::updateActions () windowPrev->setEnabled(KateDocManager::self()->documents() > 1); } -void KateFileList::keyPressEvent(QKeyEvent *e) { +void KateFileList::keyPressEvent(TQKeyEvent *e) { if ( ( e->key() == Key_Return ) || ( e->key() == Key_Enter ) ) { e->accept(); @@ -166,7 +166,7 @@ void KateFileList::keyPressEvent(QKeyEvent *e) { // leftclick outside items. // ### if we get to accept keyboard navigation, set focus before // returning -void KateFileList::contentsMousePressEvent( QMouseEvent *e ) +void KateFileList::contentsMousePressEvent( TQMouseEvent *e ) { if ( ! itemAt( contentsToViewport( e->pos() ) ) ) return; @@ -174,7 +174,7 @@ void KateFileList::contentsMousePressEvent( QMouseEvent *e ) KListView::contentsMousePressEvent( e ); } -void KateFileList::resizeEvent( QResizeEvent *e ) +void KateFileList::resizeEvent( TQResizeEvent *e ) { KListView::resizeEvent( e ); @@ -217,9 +217,9 @@ void KateFileList::slotPrevDocument() void KateFileList::slotDocumentCreated (Kate::Document *doc) { new KateFileListItem( this, doc/*, doc->documentNumber()*/ ); - connect(doc,SIGNAL(modStateChanged(Kate::Document *)),this,SLOT(slotModChanged(Kate::Document *))); - connect(doc,SIGNAL(nameChanged(Kate::Document *)),this,SLOT(slotNameChanged(Kate::Document *))); - connect(doc,SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); + connect(doc,TQT_SIGNAL(modStateChanged(Kate::Document *)),this,TQT_SLOT(slotModChanged(Kate::Document *))); + connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotNameChanged(Kate::Document *))); + connect(doc,TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,TQT_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); sort(); updateActions (); @@ -227,7 +227,7 @@ void KateFileList::slotDocumentCreated (Kate::Document *doc) void KateFileList::slotDocumentDeleted (uint documentNumber) { - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while( item ) { if ( ((KateFileListItem *)item)->documentNumber() == documentNumber ) { @@ -244,7 +244,7 @@ void KateFileList::slotDocumentDeleted (uint documentNumber) updateActions (); } -void KateFileList::slotActivateView( QListViewItem *item ) +void KateFileList::slotActivateView( TQListViewItem *item ) { if ( ! item || item->rtti() != RTTI_KateFileListItem ) return; @@ -256,7 +256,7 @@ void KateFileList::slotModChanged (Kate::Document *doc) { if (!doc) return; - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while( item ) { if ( ((KateFileListItem *)item)->documentNumber() == doc->documentNumber() ) @@ -291,7 +291,7 @@ void KateFileList::slotNameChanged (Kate::Document *doc) // ### using nextSibling to *only* look at toplevel items. // child items could be marks for example - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while( item ) { if ( ((KateFileListItem*)item)->document() == doc ) { @@ -311,7 +311,7 @@ void KateFileList::slotViewChanged () Kate::View *view = viewManager->activeView(); uint dn = view->getDoc()->documentNumber(); - QListViewItem * i = firstChild(); + TQListViewItem * i = firstChild(); while( i ) { if ( ((KateFileListItem *)i)->documentNumber() == dn ) { @@ -348,23 +348,23 @@ void KateFileList::slotViewChanged () } -void KateFileList::slotMenu ( QListViewItem *item, const QPoint &p, int /*col*/ ) +void KateFileList::slotMenu ( TQListViewItem *item, const TQPoint &p, int /*col*/ ) { if (!item) return; - QPopupMenu *menu = (QPopupMenu*) ((viewManager->mainWindow())->factory()->container("filelist_popup", viewManager->mainWindow())); + TQPopupMenu *menu = (TQPopupMenu*) ((viewManager->mainWindow())->factory()->container("filelist_popup", viewManager->mainWindow())); if (menu) menu->exec(p); } -QString KateFileList::tooltip( QListViewItem *item, int ) +TQString KateFileList::tooltip( TQListViewItem *item, int ) { KateFileListItem *i = ((KateFileListItem*)item); - if ( ! i ) return QString::null; + if ( ! i ) return TQString::null; - QString str; + TQString str; const KateDocumentInfo *info = KateDocManager::self()->documentInfo(i->document()); if (info && info->modifiedOnDisc) @@ -393,9 +393,9 @@ void KateFileList::updateSort () sort (); } -void KateFileList::readConfig( KConfig *config, const QString &group ) +void KateFileList::readConfig( KConfig *config, const TQString &group ) { - QString oldgroup = config->group(); + TQString oldgroup = config->group(); config->setGroup( group ); setSortType( config->readNumEntry( "Sort Type", sortByID ) ); @@ -408,9 +408,9 @@ void KateFileList::readConfig( KConfig *config, const QString &group ) config->setGroup( oldgroup ); } -void KateFileList::writeConfig( KConfig *config, const QString &group ) +void KateFileList::writeConfig( KConfig *config, const TQString &group ) { - QString oldgroup = config->group(); + TQString oldgroup = config->group(); config->setGroup( group ); config->writeEntry( "Sort Type", m_sort ); @@ -421,21 +421,21 @@ void KateFileList::writeConfig( KConfig *config, const QString &group ) config->setGroup( oldgroup ); } -void KateFileList::takeItem( QListViewItem *item ) +void KateFileList::takeItem( TQListViewItem *item ) { if ( item->rtti() == RTTI_KateFileListItem ) { m_editHistory.removeRef( (KateFileListItem*)item ); m_viewHistory.removeRef( (KateFileListItem*)item ); } - QListView::takeItem( item ); + TQListView::takeItem( item ); } //END KateFileList //BEGIN KateFileListItem -KateFileListItem::KateFileListItem( QListView* lv, +KateFileListItem::KateFileListItem( TQListView* lv, Kate::Document *_doc ) - : QListViewItem( lv, _doc->docName() ), + : TQListViewItem( lv, _doc->docName() ), doc( _doc ), m_viewhistpos( 0 ), m_edithistpos( 0 ), @@ -447,13 +447,13 @@ KateFileListItem::~KateFileListItem() { } -const QPixmap *KateFileListItem::pixmap ( int column ) const +const TQPixmap *KateFileListItem::pixmap ( int column ) const { if ( column == 0) { - static QPixmap noPm = SmallIcon ("null"); - static QPixmap modPm = SmallIcon("modified"); - static QPixmap discPm = SmallIcon("modonhd"); - static QPixmap modmodPm = SmallIcon("modmod"); + static TQPixmap noPm = SmallIcon ("null"); + static TQPixmap modPm = SmallIcon("modified"); + static TQPixmap discPm = SmallIcon("modonhd"); + static TQPixmap modmodPm = SmallIcon("modmod"); const KateDocumentInfo *info = KateDocManager::self()->documentInfo(doc); @@ -466,22 +466,22 @@ const QPixmap *KateFileListItem::pixmap ( int column ) const return 0; } -void KateFileListItem::paintCell( QPainter *painter, const QColorGroup & cg, int column, int width, int align ) +void KateFileListItem::paintCell( TQPainter *painter, const TQColorGroup & cg, int column, int width, int align ) { KateFileList *fl = (KateFileList*)listView(); if ( ! fl ) return; if ( column == 0 ) { - QColorGroup cgNew = cg; + TQColorGroup cgNew = cg; // replace the base color with a different shading if necessary... if ( fl->shadingEnabled() && m_viewhistpos > 1 ) { - QColor b( cg.base() ); + TQColor b( cg.base() ); - QColor shade = fl->viewShade(); - QColor eshade = fl->editShade(); + TQColor shade = fl->viewShade(); + TQColor eshade = fl->editShade(); int hc = fl->histCount(); // If this file is in the edit history, blend in the eshade // color. The blend is weighted by the position in the editing history @@ -507,16 +507,16 @@ void KateFileListItem::paintCell( QPainter *painter, const QColorGroup & cg, int (int)((b.blue()*(1-t)) + (shade.blue()*t)) ); - cgNew.setColor(QColorGroup::Base, b); + cgNew.setColor(TQColorGroup::Base, b); } - QListViewItem::paintCell( painter, cgNew, column, width, align ); + TQListViewItem::paintCell( painter, cgNew, column, width, align ); } else - QListViewItem::paintCell( painter, cg, column, width, align ); + TQListViewItem::paintCell( painter, cg, column, width, align ); } -int KateFileListItem::compare ( QListViewItem * i, int col, bool ascending ) const +int KateFileListItem::compare ( TQListViewItem * i, int col, bool ascending ) const { if ( i->rtti() == RTTI_KateFileListItem ) { @@ -533,7 +533,7 @@ int KateFileListItem::compare ( QListViewItem * i, int col, bool ascending ) con return doc->url().prettyURL().compare( ((KateFileListItem*)i)->document()->url().prettyURL() ); break; default: - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); } } return 0; @@ -541,68 +541,68 @@ int KateFileListItem::compare ( QListViewItem * i, int col, bool ascending ) con //END KateFileListItem //BEGIN KFLConfigPage -KFLConfigPage::KFLConfigPage( QWidget* parent, const char *name, KateFileList *fl ) +KFLConfigPage::KFLConfigPage( TQWidget* parent, const char *name, KateFileList *fl ) : Kate::ConfigPage( parent, name ), m_filelist( fl ), m_changed( false ) { - QVBoxLayout *lo1 = new QVBoxLayout( this ); + TQVBoxLayout *lo1 = new TQVBoxLayout( this ); int spacing = KDialog::spacingHint(); lo1->setSpacing( spacing ); - QGroupBox *gb = new QGroupBox( 1, Qt::Horizontal, i18n("Background Shading"), this ); + TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Background Shading"), this ); lo1->addWidget( gb ); - QWidget *g = new QWidget( gb ); - QGridLayout *lo = new QGridLayout( g, 2, 2 ); + TQWidget *g = new TQWidget( gb ); + TQGridLayout *lo = new TQGridLayout( g, 2, 2 ); lo->setSpacing( KDialog::spacingHint() ); - cbEnableShading = new QCheckBox( i18n("&Enable background shading"), g ); + cbEnableShading = new TQCheckBox( i18n("&Enable background shading"), g ); lo->addMultiCellWidget( cbEnableShading, 1, 1, 0, 1 ); kcbViewShade = new KColorButton( g ); - lViewShade = new QLabel( kcbViewShade, i18n("&Viewed documents' shade:"), g ); + lViewShade = new TQLabel( kcbViewShade, i18n("&Viewed documents' shade:"), g ); lo->addWidget( lViewShade, 2, 0 ); lo->addWidget( kcbViewShade, 2, 1 ); kcbEditShade = new KColorButton( g ); - lEditShade = new QLabel( kcbEditShade, i18n("&Modified documents' shade:"), g ); + lEditShade = new TQLabel( kcbEditShade, i18n("&Modified documents' shade:"), g ); lo->addWidget( lEditShade, 3, 0 ); lo->addWidget( kcbEditShade, 3, 1 ); // sorting - QHBox *hbSorting = new QHBox( this ); + TQHBox *hbSorting = new TQHBox( this ); lo1->addWidget( hbSorting ); - lSort = new QLabel( i18n("&Sort by:"), hbSorting ); - cmbSort = new QComboBox( hbSorting ); + lSort = new TQLabel( i18n("&Sort by:"), hbSorting ); + cmbSort = new TQComboBox( hbSorting ); lSort->setBuddy( cmbSort ); - QStringList l; + TQStringList l; l << i18n("Opening Order") << i18n("Document Name") << i18n("URL"); cmbSort->insertStringList( l ); lo1->insertStretch( -1, 10 ); - QWhatsThis::add( cbEnableShading, i18n( + TQWhatsThis::add( cbEnableShading, i18n( "When background shading is enabled, documents that have been viewed " "or edited within the current session will have a shaded background. " "The most recent documents have the strongest shade.") ); - QWhatsThis::add( kcbViewShade, i18n( + TQWhatsThis::add( kcbViewShade, i18n( "Set the color for shading viewed documents.") ); - QWhatsThis::add( kcbEditShade, i18n( + TQWhatsThis::add( kcbEditShade, i18n( "Set the color for modified documents. This color is blended into " "the color for viewed files. The most recently edited documents get " "most of this color.") ); - QWhatsThis::add( cmbSort, i18n( + TQWhatsThis::add( cmbSort, i18n( "Set the sorting method for the documents.") ); reload(); |