summaryrefslogtreecommitdiffstats
path: root/kommander/editor/formfile.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/editor/formfile.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/formfile.cpp')
-rw-r--r--kommander/editor/formfile.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp
index 0f5ab63c..90b9ba18 100644
--- a/kommander/editor/formfile.cpp
+++ b/kommander/editor/formfile.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -26,10 +26,10 @@
#include "resource.h"
#include "workspace.h"
-// Qt includes
+// TQt includes
#include <tqfile.h>
#include <tqregexp.h>
-#include <tqstatusbar.h>
+#include <statusbar.h>
#include <tqtimer.h>
// KDE includes
@@ -80,7 +80,7 @@ void FormFile::setFileName(const TQString &fn)
return;
if (fn.isEmpty()) {
fileNameTemp = true;
- if (filename.find("unnamed"))
+ if (filename.tqfind("unnamed"))
filename = createUnnamedFileName();
return;
}
@@ -119,12 +119,12 @@ bool FormFile::save(bool withMsgBox)
if (!resource.save(filename, false))
{
if (KMessageBox::questionYesNo(MainWindow::self, i18n("Failed to save file '%1'.\n"
- "Do you want to use another file name?").arg(filename), TQString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
+ "Do you want to use another file name?").tqarg(filename), TQString(), i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
return saveAs();
else
return false;
}
- MainWindow::self->statusBar()->message(i18n("'%1' saved.").arg(filename), 3000);
+ MainWindow::self->statusBar()->message(i18n("'%1' saved.").tqarg(filename), 3000);
::chmod(filename.local8Bit(), S_IRWXU);
setModified(false);
return true;
@@ -137,9 +137,9 @@ bool FormFile::saveAs()
f = TQString(formWindow()->name()).lower() + ".kmdr";
bool saved = false;
while (!saved) {
- TQString fn = KFileDialog::getSaveFileName(TQString::null,
+ TQString fn = KFileDialog::getSaveFileName(TQString(),
i18n("*.kmdr|Kommander Files"), MainWindow::self,
- i18n("Save Form '%1' As").arg(formWindow()->name()));
+ i18n("Save Form '%1' As").tqarg(formWindow()->name()));
if (fn.isEmpty())
return false;
TQFileInfo fi(fn);
@@ -182,7 +182,7 @@ bool FormFile::closeEvent()
}
switch (KMessageBox::warningYesNoCancel(MainWindow::self, i18n("Dialog '%1' was modified."
- "Do you want to save it?").arg(filename), i18n("Save File?"), KStdGuiItem::save(), KStdGuiItem::discard())) {
+ "Do you want to save it?").tqarg(filename), i18n("Save File?"), KStdGuiItem::save(), KStdGuiItem::discard())) {
case KMessageBox::Yes:
if (!save())
return false;
@@ -264,7 +264,7 @@ TQString FormFile::formName() const
line = ts.readLine();
if (!className.isEmpty())
{
- int end = line.find("</class>");
+ int end = line.tqfind("</class>");
if (end == -1)
className += line;
else
@@ -275,9 +275,9 @@ TQString FormFile::formName() const
continue;
}
int start;
- if ((start = line.find("<class>")) != -1)
+ if ((start = line.tqfind("<class>")) != -1)
{
- int end = line.find("</class>");
+ int end = line.tqfind("</class>");
if (end == -1)
className = line.mid(start + 7);
else