Browse Source

Trinity Qt initial conversion


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 9 years ago
parent
commit
c663b64409
100 changed files with 2159 additions and 2159 deletions
  1. 22
    22
      drkonqi/backtrace.cpp
  2. 5
    5
      drkonqi/backtrace.h
  3. 2
    2
      drkonqi/crashtest.cpp
  4. 29
    29
      drkonqi/debugger.cpp
  5. 10
    10
      drkonqi/debugger.h
  6. 4
    4
      drkonqi/drbugreport.cpp
  7. 3
    3
      drkonqi/drbugreport.h
  8. 20
    20
      drkonqi/krashconf.cpp
  9. 36
    36
      drkonqi/krashconf.h
  10. 9
    9
      drkonqi/krashdcopinterface.h
  11. 23
    23
      drkonqi/toplevel.cpp
  12. 4
    4
      drkonqi/toplevel.h
  13. 22
    22
      kappfinder/common.cpp
  14. 11
    11
      kappfinder/common.h
  15. 5
    5
      kappfinder/main_install.cpp
  16. 41
    41
      kappfinder/toplevel.cpp
  17. 15
    15
      kappfinder/toplevel.h
  18. 23
    23
      kate/app/kateapp.cpp
  19. 6
    6
      kate/app/kateapp.h
  20. 5
    5
      kate/app/kateappIface.cpp
  21. 5
    5
      kate/app/kateappIface.h
  22. 70
    70
      kate/app/kateconfigdialog.cpp
  23. 10
    10
      kate/app/kateconfigdialog.h
  24. 13
    13
      kate/app/kateconfigplugindialogpage.cpp
  25. 3
    3
      kate/app/kateconfigplugindialogpage.h
  26. 5
    5
      kate/app/kateconsole.cpp
  27. 3
    3
      kate/app/kateconsole.h
  28. 40
    40
      kate/app/katedocmanager.cpp
  29. 19
    19
      kate/app/katedocmanager.h
  30. 1
    1
      kate/app/katedocmanageriface.cpp
  31. 1
    1
      kate/app/katedocmanageriface.h
  32. 115
    115
      kate/app/kateexternaltools.cpp
  33. 33
    33
      kate/app/kateexternaltools.h
  34. 93
    93
      kate/app/katefilelist.cpp
  35. 26
    26
      kate/app/katefilelist.h
  36. 139
    139
      kate/app/katefileselector.cpp
  37. 22
    22
      kate/app/katefileselector.h
  38. 81
    81
      kate/app/kategrepdialog.cpp
  39. 22
    22
      kate/app/kategrepdialog.h
  40. 15
    15
      kate/app/katemailfilesdialog.cpp
  41. 5
    5
      kate/app/katemailfilesdialog.h
  42. 14
    14
      kate/app/katemain.cpp
  43. 82
    82
      kate/app/katemainwindow.cpp
  44. 8
    8
      kate/app/katemainwindow.h
  45. 1
    1
      kate/app/katemainwindowiface.cpp
  46. 73
    73
      kate/app/katemdi.cpp
  47. 37
    37
      kate/app/katemdi.h
  48. 25
    25
      kate/app/katemwmodonhddialog.cpp
  49. 4
    4
      kate/app/katemwmodonhddialog.h
  50. 13
    13
      kate/app/katepluginmanager.cpp
  51. 8
    8
      kate/app/katepluginmanager.h
  52. 31
    31
      kate/app/katesavemodifieddialog.cpp
  53. 5
    5
      kate/app/katesavemodifieddialog.h
  54. 66
    66
      kate/app/katesession.cpp
  55. 23
    23
      kate/app/katesession.h
  56. 11
    11
      kate/app/katetabwidget.cpp
  57. 9
    9
      kate/app/katetabwidget.h
  58. 42
    42
      kate/app/kateviewmanager.cpp
  59. 10
    10
      kate/app/kateviewmanager.h
  60. 54
    54
      kate/app/kateviewspace.cpp
  61. 22
    22
      kate/app/kateviewspace.h
  62. 61
    61
      kate/app/kateviewspacecontainer.cpp
  63. 10
    10
      kate/app/kateviewspacecontainer.h
  64. 11
    11
      kate/app/kbookmarkhandler.cpp
  65. 9
    9
      kate/app/kbookmarkhandler.h
  66. 50
    50
      kate/app/kwritemain.cpp
  67. 8
    8
      kate/app/kwritemain.h
  68. 1
    1
      kate/interfaces/application.cpp
  69. 1
    1
      kate/interfaces/application.h
  70. 2
    2
      kate/interfaces/documentmanager.cpp
  71. 2
    2
      kate/interfaces/documentmanager.h
  72. 2
    2
      kate/interfaces/mainwindow.cpp
  73. 3
    3
      kate/interfaces/mainwindow.h
  74. 2
    2
      kate/interfaces/plugin.cpp
  75. 3
    3
      kate/interfaces/plugin.h
  76. 1
    1
      kate/interfaces/pluginconfiginterfaceextension.cpp
  77. 7
    7
      kate/interfaces/pluginconfiginterfaceextension.h
  78. 5
    5
      kate/interfaces/pluginmanager.cpp
  79. 5
    5
      kate/interfaces/pluginmanager.h
  80. 5
    5
      kate/interfaces/toolviewmanager.cpp
  81. 5
    5
      kate/interfaces/toolviewmanager.h
  82. 2
    2
      kate/interfaces/viewmanager.cpp
  83. 1
    1
      kate/interfaces/viewmanager.h
  84. 21
    21
      kate/utils/dockviewbase.cpp
  85. 10
    10
      kate/utils/dockviewbase.h
  86. 2
    2
      kate/utils/listboxview.cpp
  87. 2
    2
      kate/utils/listboxview.h
  88. 6
    6
      kate/utils/messageview.cpp
  89. 5
    5
      kate/utils/messageview.h
  90. 22
    22
      kcminit/main.cpp
  91. 3
    3
      kcminit/main.h
  92. 36
    36
      kcontrol/access/kaccess.cpp
  93. 9
    9
      kcontrol/access/kaccess.h
  94. 155
    155
      kcontrol/access/kcmaccess.cpp
  95. 17
    17
      kcontrol/access/kcmaccess.h
  96. 8
    8
      kcontrol/accessibility/accessibility.cpp
  97. 1
    1
      kcontrol/accessibility/accessibility.h
  98. 92
    92
      kcontrol/arts/arts.cpp
  99. 20
    20
      kcontrol/arts/arts.h
  100. 0
    0
      kcontrol/arts/krichtextlabel.cpp

+ 22
- 22
drkonqi/backtrace.cpp View File

@@ -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" ));
}
}
}

+ 5
- 5
drkonqi/backtrace.h View File

@@ -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

+ 2
- 2
drkonqi/crashtest.cpp View File

@@ -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;

+ 29
- 29
drkonqi/debugger.cpp View File

@@ -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 ))
{

+ 10
- 10
drkonqi/debugger.h View File

@@ -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

+ 4
- 4
drkonqi/drbugreport.cpp View File

@@ -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;

+ 3
- 3
drkonqi/drbugreport.h View File

@@ -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

+ 20
- 20
drkonqi/krashconf.cpp View File

@@ -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

+ 36
- 36
drkonqi/krashconf.h View File

@@ -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

+ 9
- 9
drkonqi/krashdcopinterface.h View File

@@ -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();

+ 23
- 23
drkonqi/toplevel.cpp View File

@@ -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"));

+ 4
- 4
drkonqi/toplevel.h View File

@@ -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;

+ 22
- 22
kappfinder/common.cpp View File

@@ -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 );
}

+ 11
- 11
kappfinder/common.h View File

@@ -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

+ 5
- 5
kappfinder/main_install.cpp View File

@@ -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 );


+ 41
- 41
kappfinder/toplevel.cpp View File

@@ -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"

+ 15
- 15
kappfinder/toplevel.h View File

@@ -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;
};

+ 23
- 23
kate/app/kateapp.cpp View File

@@ -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);

+ 6
- 6
kate/app/kateapp.h View File

@@ -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

+ 5
- 5
kate/app/kateappIface.cpp View File

@@ -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();
}

+ 5
- 5
kate/app/kateappIface.h View File

@@ -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;

+ 70
- 70
kate/app/kateconfigdialog.cpp View File

@@ -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));

+ 10
- 10
kate/app/kateconfigdialog.h View File

@@ -64,19 +64,19 @@ class KateConfigDialog : public KDialogBase
Kate::View* v;
bool dataChanged;