summaryrefslogtreecommitdiffstats
path: root/quanta/src/quanta.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 /quanta/src/quanta.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 'quanta/src/quanta.cpp')
-rw-r--r--quanta/src/quanta.cpp388
1 files changed, 194 insertions, 194 deletions
diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp
index 16795ec9..ada60632 100644
--- a/quanta/src/quanta.cpp
+++ b/quanta/src/quanta.cpp
@@ -196,7 +196,7 @@ extern int NN;
const TQString resourceDir = TQString(QUANTA_PACKAGE) + "/";
// from kfiledialog.cpp - avoid qt warning in STDERR (~/.xsessionerrors)
-static void silenceQToolBar(QtMsgType, const char *){}
+static void silenceTQToolBar(TQtMsgType, const char *){}
QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm( 0, "Quanta", (KMdi::MdiMode) mdiMode)
@@ -206,13 +206,13 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_quantaInit = new QuantaInit(this);
dcopSettings = new DCOPSettings;
dcopQuanta = new DCOPQuanta;
- DTDs::ref(this);
+ DTDs::ref(TQT_TQOBJECT(this));
quantaStarted = true;
tempFileList.setAutoDelete(true);
m_toolbarList.setAutoDelete(true);
userToolbarsCount = 0;
baseNode = 0L;
- currentToolbarDTD = TQString::null;
+ currentToolbarDTD = TQString();
m_config=kapp->config();
idleTimer = new TQTimer(this);
connect(idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimerExpired()));
@@ -232,7 +232,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
qConfig.enableDTDToolbar = true;
// connect up signals from KXXsldbgPart
- connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(TQString,int)", false );
+ connectDCOPSignal(0, 0, "debuggerPositionChangedTQString,int)", "newDebuggerPosition(TQString,int)", false );
connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false );
connectDCOPSignal(0, 0, "openFile(TQString,int,int)", "openFile(TQString,int,int)", false);
@@ -258,7 +258,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_parserEnabled = true;
cursorLine = 0;
cursorCol = 0;
- emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
+ emit eventHappened("quanta_start", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate), TQString());
setAcceptDrops(true);
tabWidget()->installEventFilter(this);
}
@@ -320,7 +320,7 @@ QuantaApp::~QuantaApp()
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
- if (tmpDirs[i].contains("kde-"))
+ if (tmpDirs[i].tqcontains("kde-"))
tmpDir = tmpDirs[i];
}
TQString infoCss = tmpDir;
@@ -373,9 +373,9 @@ void QuantaApp::slotFileOpen(const KURL::List &urls, const TQString& encoding)
m_parserEnabled = false;
for (KURL::List::ConstIterator i = urls.begin(); i != urls.end(); ++i)
{
- if (!QExtFileInfo::exists(*i, true, this))
+ if (!TQExtFileInfo::exists(*i, true, this))
{
- KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg((*i).prettyURL(0, KURL::StripFileProtocol)));
+ KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").tqarg((*i).prettyURL(0, KURL::StripFileProtocol)));
} else
{
@@ -409,10 +409,10 @@ void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding, bool rea
void QuantaApp::slotFileOpenRecent(const KURL &url)
{
- if (!QExtFileInfo::exists(url, true, this))
+ if (!TQExtFileInfo::exists(url, true, this))
{
if (KMessageBox::questionYesNo(this,
- i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::del(), i18n("Keep"))
+ i18n("The file %1 does not exist.\n Do you want to remove it from the list?").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::del(), i18n("Keep"))
== KMessageBox::Yes)
{
fileRecent->removeURL(url);
@@ -433,7 +433,7 @@ void QuantaApp::slotFileSave()
Document *w = view->document();
if (w)
{
- w->checkDirtyStatus();
+ w->checkDirtytqStatus();
if (w->isUntitled())
slotFileSaveAs();
else
@@ -457,7 +457,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
if (w)
{
KURL oldURL = w->url();
- w->checkDirtyStatus();
+ w->checkDirtytqStatus();
if (!w->isUntitled() && oldURL.isLocalFile())
{
fileWatcher->removeFile(oldURL.path());
@@ -522,8 +522,8 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
if (QuantaCommon::checkOverwrite(saveUrl, this) && view->saveDocument(saveUrl))
{
oldURL = saveUrl;
- if (Project::ref()->hasProject() && !Project::ref()->contains(saveUrl) &&
- KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::add(), i18n("Do Not Add"))
+ if (Project::ref()->hasProject() && !Project::ref()->tqcontains(saveUrl) &&
+ KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").tqarg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::add(), i18n("Do Not Add"))
)
{
if (saveUrl.isLocalFile())
@@ -557,7 +557,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
KURL url;
int query;
KURL projectTemplateURL;
- w->checkDirtyStatus();
+ w->checkDirtytqStatus();
TQString localTemplateDir = locateLocal("data", resourceDir + "templates/");
do {
@@ -565,10 +565,10 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
if (projectTemplate)
{
- url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), TQString::null, this);
+ url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), TQString(), this);
} else
{
- url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), TQString::null, this);
+ url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), TQString(), this);
}
if (url.isEmpty()) return;
@@ -584,7 +584,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
{
if (projectTemplate)
localTemplateDir = projectTemplateURL.path(1);
- KMessageBox::sorry(this,i18n("You must save the templates in the following folder: \n\n%1").arg(localTemplateDir));
+ KMessageBox::sorry(this,i18n("You must save the templates in the following folder: \n\n%1").tqarg(localTemplateDir));
query = KMessageBox::No;
}
} while (query != KMessageBox::Yes);
@@ -602,8 +602,8 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
stream << content;
tempFile->file()->flush();
tempFile->close();
- if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this))
- KMessageBox::error(this, i18n("<qt>There was an error while creating the template file.<br>Check that you have write access to <i>%1</i>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error"));
+ if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this))
+ KMessageBox::error(this, i18n("<qt>There was an error while creating the template file.<br>Check that you have write access to <i>%1</i>.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error"));
delete tempFile;
} else
{
@@ -684,7 +684,7 @@ void QuantaApp::slotFileCloseAll()
part->write(" ");
part->end();
- slotNewStatus();
+ slotNewtqStatus();
}
void QuantaApp::slotFileQuit()
@@ -703,19 +703,19 @@ void QuantaApp::slotEditFindInFiles()
void QuantaApp::slotHelpTip()
{
- KTipDialog::showTip(this, TQString::null, true);
+ KTipDialog::showTip(this, TQString(), true);
}
void QuantaApp::slotStatusMsg(const TQString &msg)
{
statusbarTimer->stop();
statusBar()->changeItem(" " + KStringHandler::cPixelSqueeze(msg, statusBar()->fontMetrics(), progressBar->x() - 20), IDS_STATUS);
- statusBar()->repaint();
- kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
+ statusBar()->tqrepaint();
+ kapp->tqprocessEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
statusbarTimer->start(10000, true);
}
-/** repaint preview */
+/** tqrepaint preview */
void QuantaApp::slotRepaintPreview()
{
Document *w = ViewManager::ref()->activeDocument();
@@ -761,7 +761,7 @@ void QuantaApp::slotRepaintPreview()
TQString noFramesText = w->text(0,0, bl, bc - 1);
noFramesText += noframearea[0];
noFramesText += w->text(el, ec + 1, w->editIf->numLines() - 1, w->editIf->lineLength(w->editIf->numLines() - 1));
- noFramesText.replace(TQRegExp("</?noframes[^>]*>", false), "");
+ noFramesText.tqreplace(TQRegExp("</?noframes[^>]*>", false), "");
//kdDebug(24000) << "NOFRAMES: " << noFramesText << endl;
if (w->isUntitled())
m_htmlPart->begin(Project::ref()->projectBaseURL(), xOffset, yOffset);
@@ -809,7 +809,7 @@ void QuantaApp::slotRepaintPreview()
tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding.ascii()));
*(tmpFile->textStream()) << w->editIf->text();
tmpFile->close();
- if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) {
+ if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) {
m_htmlPart->setPreviewedURL(KURL()); // copy failed, force the preview of the original
};
delete tmpFile;
@@ -864,7 +864,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
baseURL = w->url();
baseURL.setFileName("");
}
- KURL relURL = QExtFileInfo::toRelative(url, baseURL);
+ KURL relURL = TQExtFileInfo::toRelative(url, baseURL);
TQString urlStr = relURL.url();
if (relURL.protocol() == baseURL.protocol())
urlStr = relURL.path();
@@ -876,7 +876,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
} else
{
TQString mimetype = KMimeType::findByURL(url)->name();
- if (mimetype.contains("image"))
+ if (mimetype.tqcontains("image"))
{
TQString imgFileName;
KIO::NetAccess::download(url, imgFileName, this);
@@ -915,7 +915,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
}
}
-void QuantaApp::slotNewStatus()
+void QuantaApp::slotNewtqStatus()
{
fileRecent->setEnabled(true);
actionCollection()->action("project_open_recent")->setEnabled(true);
@@ -965,7 +965,7 @@ void QuantaApp::slotOptionsConfigureKeys()
for( TQPtrListIterator<KXMLGUIClient> it( clients );
it.current(); ++it )
{
- if (toolbarGuiClients.contains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection
+ if (toolbarGuiClients.tqcontains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection
dlg.insert((*it)->actionCollection());
}
if (dlg.configure() == KKeyDialog::Accepted)
@@ -1026,7 +1026,7 @@ void QuantaApp::slotOptionsConfigureKeys()
el.setAttribute("shortcut", action->shortcut().toString());
el = node.toElement();
node = node.nextSibling();
- el.parentNode().removeChild(el);
+ el.tqparentNode().removeChild(el);
} else
{
node = node.nextSibling();
@@ -1161,7 +1161,7 @@ void QuantaApp::slotOptions()
KDialogBase::Ok, this, "tabdialog");
// Tag Style options
- TQVBox *page=kd->addVBoxPage(i18n("Tag Style"), TQString::null, BarIcon("kwrite", KIcon::SizeMedium));
+ TQVBox *page=kd->addVBoxPage(i18n("Tag Style"), TQString(), BarIcon("kwrite", KIcon::SizeMedium));
StyleOptionsS *styleOptionsS = new StyleOptionsS( (TQWidget *)page);
styleOptionsS->tagCase->setCurrentItem( qConfig.tagCase);
@@ -1175,7 +1175,7 @@ void QuantaApp::slotOptions()
// Environment options
//TODO FileMasks name is not good anymore
- page=kd->addVBoxPage(i18n("Environment"), TQString::null, UserIcon("files", KIcon::SizeMedium ) );
+ page=kd->addVBoxPage(i18n("Environment"), TQString(), UserIcon("files", KIcon::SizeMedium ) );
FileMasks *fileMasks = new FileMasks((TQWidget *)page);
fileMasks->lineMarkup->setText( qConfig.markupMimeTypes );
@@ -1215,7 +1215,7 @@ void QuantaApp::slotOptions()
fileMasks->defaultDTDCombo->setCurrentItem(pos);
// Preview options
- page=kd->addVBoxPage(i18n("User Interface"), TQString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
+ page=kd->addVBoxPage(i18n("User Interface"), TQString(), BarIcon("view_choose", KIcon::SizeMedium ) );
PreviewOptions *uiOptions = new PreviewOptions( (TQWidget *)page );
uiOptions->setPosition(qConfig.previewPosition);
@@ -1238,10 +1238,10 @@ void QuantaApp::slotOptions()
uiOptions->warnEventActions->setChecked(true);
}
//kafka options
- page = kd->addVBoxPage(i18n("VPL View"), TQString::null, UserIcon("vpl_text", KIcon::SizeMedium));
+ page = kd->addVBoxPage(i18n("VPL View"), TQString(), UserIcon("vpl_text", KIcon::SizeMedium));
KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (TQWidget *)page );
- page=kd->addVBoxPage(i18n("Parser"), TQString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
+ page=kd->addVBoxPage(i18n("Parser"), TQString(), BarIcon("kcmsystem", KIcon::SizeMedium ) );
ParserOptions *parserOptions = new ParserOptions( m_config, (TQWidget *)page );
parserOptions->refreshFrequency->setValue(qConfig.refreshFrequency);
@@ -1250,7 +1250,7 @@ void QuantaApp::slotOptions()
parserOptions->showClosingTags->setChecked(qConfig.showClosingTags);
parserOptions->spinExpand->setValue(qConfig.expandLevel);
- page = kd->addVBoxPage(i18n("Abbreviations"), TQString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
+ page = kd->addVBoxPage(i18n("Abbreviations"), TQString(), BarIcon("fontsizeup", KIcon::SizeMedium));
AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((TQWidget*)(page));
bool reloadTrees = false;
@@ -1348,7 +1348,7 @@ void QuantaApp::slotOptions()
if (previewSettingsChanged)
slotShowPreviewWidget(true);
qConfig.docPosition = uiOptions->docPosition();
- qConfig.windowLayout = uiOptions->layout();
+ qConfig.windowLayout = uiOptions->tqlayout();
m_htmlPart->closeURL();
m_htmlPart->begin( Project::ref()->projectBaseURL());
@@ -1356,7 +1356,7 @@ void QuantaApp::slotOptions()
m_htmlPart->end();
reparse(true);
- slotNewStatus();
+ slotNewtqStatus();
}
m_config->sync();
@@ -1379,7 +1379,7 @@ void QuantaApp::slotShowPreviewWidget(bool show)
{
delete m_previewToolView;
m_previewToolView = 0L;
- view->addCustomWidget(m_htmlPart->view(), TQString::null);
+ view->addCustomWidget(m_htmlPart->view(), TQString());
} else
{
if (!m_previewToolView)
@@ -1402,7 +1402,7 @@ void QuantaApp::slotShowPreviewWidget(bool show)
m_htmlPart->view()->hide();
if (qConfig.previewPosition == "Editor")
{
- view->addCustomWidget(0L, TQString::null);
+ view->addCustomWidget(0L, TQString());
delete m_previewToolView;
m_previewToolView = 0L;
} else
@@ -1437,7 +1437,7 @@ void QuantaApp::slotShowPreviewWidget(bool show)
}
}
-void QuantaApp::slotChangePreviewStatus()
+void QuantaApp::slotChangePreviewtqStatus()
{
if (qConfig.previewPosition == "Editor")
{
@@ -1446,7 +1446,7 @@ void QuantaApp::slotChangePreviewStatus()
if (m_previewToolView && m_htmlPart->view()->isVisible())
{
//hiding the preview when it's in a toolview means that the current tab has changed,
- //so we just repaint the content and restore the document on the disc.
+ //so we just tqrepaint the content and restore the document on the disc.
m_previewVisible = true;
if (m_previewedDocument)
{
@@ -1511,7 +1511,7 @@ void QuantaApp::newCursorPosition(const TQString &file, int lineNumber, int colu
startIdleTimer();
// updateTreeViews();
TQString linenumber;
- linenumber = i18n("Line: %1 Col: %2").arg(lineNumber).arg(columnNumber);
+ linenumber = i18n("Line: %1 Col: %2").tqarg(lineNumber).tqarg(columnNumber);
statusBar()->changeItem(linenumber, IDS_STATUS_CLM);
statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR);
statusBar()->changeItem("",IDS_MODIFIED);
@@ -1525,7 +1525,7 @@ void QuantaApp::newDebuggerPosition(const TQString &file, int lineNumber)
void QuantaApp::openFile(const TQString &file, int lineNumber, int columnNumber)
{
gotoFileAndLine(file, lineNumber, columnNumber);
- slotNewStatus();
+ slotNewtqStatus();
}
void QuantaApp::slotNewLineColumn()
@@ -1539,7 +1539,7 @@ void QuantaApp::slotNewLineColumn()
Document *w = ViewManager::ref()->activeDocument();
if (w)
w->viewCursorIf->cursorPosition(&cursorLine, &cursorCol);
- linenumber = i18n("Line: %1 Col: %2").arg(cursorLine+1).arg(cursorCol+1);
+ linenumber = i18n("Line: %1 Col: %2").tqarg(cursorLine+1).tqarg(cursorCol+1);
statusBar()->changeItem(linenumber, IDS_STATUS_CLM);
}
@@ -1781,7 +1781,7 @@ void QuantaApp::slotShowAnnotationView()
makeDockVisible(dynamic_cast<KDockWidget*>(m_annotationOutputView->wrapperWidget()));
}
-TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomElement &element, int &id )
+TQWidget* QuantaApp::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id )
{
TQString tabname = element.attribute( "i18ntabname", "" );
@@ -1790,12 +1790,12 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl
if ( element.tagName().lower() == "toolbar" && !tabname.isEmpty())
{
//avoid TQToolBar warning in the log
- QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
+ TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar );
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
TQWidget *w = new TQWidget(toolbarTab, TQString("ToolbarHoldingWidget" + element.attribute("name")).ascii());
QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name").ascii(), true, true);
tb->loadState(element);
- tb->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
+ tb->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
//kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl;
if (toolbarTab->iconText() == KToolBar::IconTextBottom)
@@ -1813,7 +1813,7 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl
kdDebug(24000) << "toolbarTab->tabHeight() " << toolbarTab->tabHeight() << endl;
*/
toolbarTab->insertTab(tb, tabname, idStr);
- qInstallMsgHandler( oldHandler );
+ tqInstallMsgHandler( oldHandler );
connect(tb, TQT_SIGNAL(removeAction(const TQString&, const TQString&)),
TQT_SLOT(slotRemoveAction(const TQString&, const TQString&)));
@@ -1822,18 +1822,18 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl
return tb;
}
- return KMainWindow::createContainer( parent, index, element, id );
+ return KMainWindow::createContainer( tqparent, index, element, id );
}
-void QuantaApp::removeContainer( TQWidget *container, TQWidget *parent, TQDomElement &element, int id )
+void QuantaApp::removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id )
{
if (dynamic_cast<QuantaToolBar*>(container))
{
ToolbarTabWidget::ref()->removePage(container);
}
else
- KMainWindow::removeContainer( container, parent, element, id );
+ KMainWindow::removeContainer( container, tqparent, element, id );
}
void QuantaApp::slotBack()
@@ -1911,14 +1911,14 @@ void QuantaApp::slotContextMenuAboutToShow()
name = tagStr.mid(pos, group.definitionRx.matchedLength());
node->tag->beginPos(bl, bc);
TQString tmpStr = tagStr.left(pos);
- int newLines = tmpStr.contains('\n');
+ int newLines = tmpStr.tqcontains('\n');
bl += newLines;
- int l = tmpStr.findRev('\n'); //the last EOL
+ int l = tmpStr.tqfindRev('\n'); //the last EOL
bc = (l == -1) ? bc+pos : pos - l - 1;
- newLines = name.contains('\n');
+ newLines = name.tqcontains('\n');
l = name.length();
el = bl + newLines;
- ec = (newLines > 0) ? l - name.findRev('\n') : bc + l - 1;
+ ec = (newLines > 0) ? l - name.tqfindRev('\n') : bc + l - 1;
pos += l;
int p = group.definitionRx.search(cleanName);
if (p != -1)
@@ -1942,7 +1942,7 @@ void QuantaApp::slotContextMenuAboutToShow()
}
} else
{
- TQMap<TQString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
+ TQMap<TQString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.tqfind(node->tag->name.lower());
if (it != node->tag->dtd()->xmlStructTreeGroups.constEnd())
{
@@ -1964,11 +1964,11 @@ void QuantaApp::slotContextMenuAboutToShow()
{
if (!name.isEmpty())
{
- KURL baseUrl = QExtFileInfo::path(w->url());
+ KURL baseUrl = TQExtFileInfo::path(w->url());
urlUnderCursor = baseUrl;
QuantaCommon::setUrl(urlUnderCursor, name.stripWhiteSpace());
- urlUnderCursor = QExtFileInfo::toAbsolute(urlUnderCursor, baseUrl);
- action->setText(i18n("Open File: %1").arg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80)));
+ urlUnderCursor = TQExtFileInfo::toAbsolute(urlUnderCursor, baseUrl);
+ action->setText(i18n("Open File: %1").tqarg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80)));
action->setEnabled(true);
} else
{
@@ -1979,7 +1979,7 @@ void QuantaApp::slotContextMenuAboutToShow()
action = actionCollection()->action("upload_file");
if (action)
{
- action->setEnabled(Project::ref()->contains(w->url()));
+ action->setEnabled(Project::ref()->tqcontains(w->url()));
}
// If we have a debugger session active...
@@ -1997,16 +1997,16 @@ void QuantaApp::slotContextMenuAboutToShow()
{
// Otherwise, find the word under the cursor
word = w->editIf->textLine(w->viewCursorIf->cursorLine());
- startpos = word.findRev(TQRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
+ startpos = word.tqfindRev(TQRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
word.remove(0, startpos);
if(word.left(1) != "$")
word.remove(0, 1);
- word = word.left(word.find(TQRegExp("[^a-zA-Z0-9_]"), 1));
+ word = word.left(word.tqfind(TQRegExp("[^a-zA-Z0-9_]"), 1));
}
// If we have a linebreak, take everything before the break
- startpos = word.find("\n");
+ startpos = word.tqfind("\n");
if(startpos > 0)
word = word.left(startpos);
@@ -2027,7 +2027,7 @@ void QuantaApp::slotContextMenuAboutToShow()
action = actionCollection()->action("debug_addwatch");
if(action)
{
- action->setText(i18n("Add Watch: '%1'").arg(word));
+ action->setText(i18n("Add Watch: '%1'").tqarg(word));
action->setEnabled(!word.isEmpty());
if(!action->isPlugged(popup))
@@ -2038,7 +2038,7 @@ void QuantaApp::slotContextMenuAboutToShow()
action = actionCollection()->action("debug_variable_set");
if(action)
{
- action->setText(i18n("Set Value of '%1'").arg(word));
+ action->setText(i18n("Set Value of '%1'").tqarg(word));
action->setEnabled(!word.isEmpty());
if(!action->isPlugged(popup))
@@ -2049,7 +2049,7 @@ void QuantaApp::slotContextMenuAboutToShow()
action = actionCollection()->action("debug_conditional_break");
if(action)
{
- action->setText(i18n("Break When '%1'...").arg(word));
+ action->setText(i18n("Break When '%1'...").tqarg(word));
action->setEnabled(!word.isEmpty());
if(!action->isPlugged(popup))
@@ -2074,7 +2074,7 @@ void QuantaApp::slotContextMenuAboutToShow()
void QuantaApp::slotOpenFileUnderCursor()
{
- if (QExtFileInfo::exists(urlUnderCursor, true, this))
+ if (TQExtFileInfo::exists(urlUnderCursor, true, this))
{
if (QuantaCommon::checkMimeGroup(urlUnderCursor, "text" ))
{
@@ -2087,7 +2087,7 @@ void QuantaApp::slotOpenFileUnderCursor()
}
} else
{
- KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol)));
+ KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").tqarg(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol)));
}
}
@@ -2166,8 +2166,8 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
{
if ((nodeList.item(i).cloneNode().toElement().attribute("name").lower() ) == name.lower())
{
- newName = origName + TQString(" (%1)").arg(count);
- i18nName = i18n(origName.utf8()) + TQString(" (%1)").arg(count);
+ newName = origName + TQString(" (%1)").tqarg(count);
+ i18nName = i18n(origName.utf8()) + TQString(" (%1)").tqarg(count);
nameModified = true;
count++;
found = true;
@@ -2195,12 +2195,12 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
TQString s = i18nName.lower();
TQString toolbarId = s;
TQRegExp rx("\\s|\\.");
- toolbarId.replace(rx, "_");
+ toolbarId.tqreplace(rx, "_");
int n = 1;
- while (m_toolbarList.find(toolbarId) != 0L)
+ while (m_toolbarList.tqfind(toolbarId) != 0L)
{
- toolbarId = s + TQString("%1").arg(n);
- toolbarId.replace(rx, "_");
+ toolbarId = s + TQString("%1").tqarg(n);
+ toolbarId.tqreplace(rx, "_");
n++;
}
@@ -2250,7 +2250,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
//Compatility code (read the action shortcuts from quantaui.rc)
//TODO: Remove after upgrade from 3.1 is not supported
- if (oldShortcuts.contains(actionName))
+ if (oldShortcuts.tqcontains(actionName))
{
tagAction->setModified(true);
tagAction->data().setAttribute("shortcut", oldShortcuts[actionName]);
@@ -2438,7 +2438,7 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF
TQString error;
int el, ec;
if (!dom->setContent(s, &error, &el, &ec))
- kdError(24000) << TQString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3)").tqarg(error).tqarg(el).tqarg(ec)<<endl;
p_toolbar->dom = dom;
TQTextStream bufferStr(&buffer);
@@ -2458,10 +2458,10 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF
if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
return KURL();
tar.close();
- if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this))
+ if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this))
{
KMessageBox::error(this, i18n("<qt>An error happened while saving the <b>%1</b> toolbar.<br>"
- "Check that you have write permissions for<br><b>%2</b>.<br><br>This might happen if you tried save to save a global toolbar as a simple user. Use <i>Save As</i> or <i>Toolbars->Save Toolbars->Save as Local Toolbar</i> in this case. </qt>").arg(p_toolbar->name).arg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error"));
+ "Check that you have write permissions for<br><b>%2</b>.<br><br>This might happen if you tried save to save a global toolbar as a simple user. Use <i>Save As</i> or <i>Toolbars->Save Toolbars->Save as Local Toolbar</i> in this case. </qt>").tqarg(p_toolbar->name).tqarg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error"));
tarFile = KURL();
delete p_toolbar->dom;
p_toolbar->dom = oldDom;
@@ -2554,7 +2554,7 @@ bool QuantaApp::saveToolbar(bool localToolbar, const TQString& toolbarToSave, co
if (!localToolbar)
localToolbarsDir = projectToolbarsURL.prettyURL();
KMessageBox::sorry(0,i18n("<qt>You must save the toolbars to the following folder: <br><br><b>%1</b></qt>")
- .arg(localToolbarsDir));
+ .tqarg(localToolbarsDir));
query = KMessageBox::No;
}
} while (query != KMessageBox::Yes);
@@ -2591,16 +2591,16 @@ void QuantaApp::slotSaveProjectToolbar()
void QuantaApp::slotAddToolbar()
{
bool ok;
- TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
+ TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").tqarg(userToolbarsCount), &ok, this);
if (ok)
{
userToolbarsCount++;
TQString toolbarId = name;
int n = 1;
- while (m_toolbarList.find(toolbarId) != 0L)
+ while (m_toolbarList.tqfind(toolbarId) != 0L)
{
- toolbarId = name + TQString("%1").arg(n);
+ toolbarId = name + TQString("%1").tqarg(n);
n++;
}
toolbarId = toolbarId.lower();
@@ -2609,7 +2609,7 @@ void QuantaApp::slotAddToolbar()
tempFile->setAutoDelete(true);
tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
* (tempFile->textStream()) << TQString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
- .arg(name.lower()).arg(name).arg(name).arg(toolbarId).arg(name);
+ .tqarg(name.lower()).tqarg(name).tqarg(name).tqarg(toolbarId).tqarg(name);
tempFile->close();
ToolbarXMLGUI * toolbarGUI = new ToolbarXMLGUI(tempFile->name());
@@ -2700,7 +2700,7 @@ TQString QuantaApp::createToolbarTarball()
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (!ok)
- return TQString::null;
+ return TQString();
TQString toolbarName = res;
for (uint i = 0; i < lst.count(); i++)
@@ -2759,7 +2759,7 @@ void QuantaApp::slotSendToolbar()
return;
}
- kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, toolbarFile);
+ kapp->invokeMailer(toStr, TQString(), TQString(), subjectStr, message, TQString(), toolbarFile);
}
delete mailDlg;
}
@@ -2767,7 +2767,7 @@ void QuantaApp::slotSendToolbar()
void QuantaApp::slotDownloadToolbar()
{
if (!m_newToolbarStuff)
- m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this);
+ m_newToolbarStuff = new TQNewToolbarStuff("quanta/toolbar", this);
m_newToolbarStuff->downloadResource();
}
@@ -2777,7 +2777,7 @@ void QuantaApp::slotUploadToolbar()
if (tempFileName.isNull())
return;
if (!m_newToolbarStuff)
- m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this);
+ m_newToolbarStuff = new TQNewToolbarStuff("quanta/toolbar", this);
// tempDirList.append(m_newToolbarStuff->uploadResource(tempFileName));
m_newToolbarStuff->uploadResource(tempFileName);
}
@@ -2846,7 +2846,7 @@ void QuantaApp::slotRenameToolbar(const TQString& name)
{
if (tb->id(i) == name)
{
- tb->setTabLabel(tb->page(i)->parentWidget(), i18n(p_toolbar->name.utf8()));
+ tb->setTabLabel(tb->page(i)->tqparentWidget(), i18n(p_toolbar->name.utf8()));
m_tagsMenu->changeItem(m_tagsMenu->idAt(i + 2), i18n(p_toolbar->name.utf8()));
break;
}
@@ -2920,7 +2920,7 @@ void QuantaApp::slotDeleteAction(KAction *action)
//we found a toolbar that contains the action
if (nodeList.item(j).toElement().attribute("name") == actionName)
{
- nodeList.item(j).parentNode().removeChild(nodeList.item(j));
+ nodeList.item(j).tqparentNode().removeChild(nodeList.item(j));
KXMLGUIFactory::saveConfigFile(guiClient->domDocument(), guiClient->xmlFile());
break;
}
@@ -2936,7 +2936,7 @@ void QuantaApp::slotRemoveAction(const TQString& toolbarName, const TQString& a_
{
KAction *action = 0L;
TQString actionName = a_actionName;
- actionName.replace('&',"&&");
+ actionName.tqreplace('&',"&&");
KActionCollection *ac = actionCollection();
uint actionCount = ac->count();
TQString str;
@@ -2976,7 +2976,7 @@ void QuantaApp::slotRemoveAction(const TQString& toolbarName, const TQString& a_
{
action->unplug(ToolbarTabWidget::ref()->page(toolbarName));
action->unplug(p_toolbar->menu);
- node.parentNode().removeChild(node);
+ node.tqparentNode().removeChild(node);
}
node = node.nextSibling();
}
@@ -3014,10 +3014,10 @@ void QuantaApp::setDtep(const TQString& dtepName, bool convert)
if (w)
{
TQString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
- if (!DTDs::ref()->find(dtep))
+ if (!DTDs::ref()->tqfind(dtep))
return;
w->setDTDIdentifier(dtep);
- const DTDStruct *dtd = DTDs::ref()->find(w->getDTDIdentifier());
+ const DTDStruct *dtd = DTDs::ref()->tqfind(w->getDTDIdentifier());
if (convert && dtd->family == Xml)
{
Tag *tag = 0L;
@@ -3096,7 +3096,7 @@ void QuantaApp::slotEditDTD()
bool ok = false;
TQString res = KInputDialog::getItem(
i18n( "Edit DTD" ),
- i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
+ i18n( "Please select a DTD:" ), lst, lst.tqfindIndex(nickName), false, &ok, this );
TQString s = i18n("Create a new DTEP description");
s = i18n("Load DTEP description from disk");
@@ -3106,7 +3106,7 @@ void QuantaApp::slotEditDTD()
TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
KDialogBase editDlg(this, "edit_dtep", true, i18n("Configure DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
- DTEPEditDlg dtepDlg(DTDs::ref()->find(dtdName)->fileName, &editDlg);
+ DTEPEditDlg dtepDlg(DTDs::ref()->tqfind(dtdName)->fileName, &editDlg);
editDlg.setMainWidget(&dtepDlg);
if (editDlg.exec())
{
@@ -3122,7 +3122,7 @@ void QuantaApp::focusInEvent(TQFocusEvent* e)
if (w)
{
w->view()->setFocus();
- w->checkDirtyStatus();
+ w->checkDirtytqStatus();
}
}
@@ -3166,17 +3166,17 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName)
if (!currentToolbarDTD.isEmpty())
{
- oldDtd = DTDs::ref()->find(currentToolbarDTD);
+ oldDtd = DTDs::ref()->tqfind(currentToolbarDTD);
if (!oldDtd)
- oldDtd = DTDs::ref()->find(Project::ref()->defaultDTD());
+ oldDtd = DTDs::ref()->tqfind(Project::ref()->defaultDTD());
}
TQString fileName;
- const DTDStruct *newDtd = DTDs::ref()->find(dtdName);
+ const DTDStruct *newDtd = DTDs::ref()->tqfind(dtdName);
if (!newDtd)
{
- newDtd = DTDs::ref()->find(Project::ref()->defaultDTD());
+ newDtd = DTDs::ref()->tqfind(Project::ref()->defaultDTD());
if (!newDtd)
- newDtd = DTDs::ref()->find(qConfig.defaultDocType); //extreme case
+ newDtd = DTDs::ref()->tqfind(qConfig.defaultDocType); //extreme case
}
ToolbarEntry *p_toolbar;
@@ -3200,7 +3200,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName)
//first load the local version if it exists
fileName = locateLocal("data", resourceDir + "toolbars/"+newDtd->toolbars[i]);
QuantaCommon::setUrl(url, fileName);
- if (QExtFileInfo::exists(url, true, this))
+ if (TQExtFileInfo::exists(url, true, this))
{
//showToolbarFile(url);
newToolbars += url;
@@ -3208,7 +3208,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName)
{
fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+newDtd->toolbars[i];
QuantaCommon::setUrl(url, fileName);
- if (QExtFileInfo::exists(url, true, this))
+ if (TQExtFileInfo::exists(url, true, this))
{
newToolbars += url;// showToolbarFile(url);
}
@@ -3225,7 +3225,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName)
KURL urlLocal;
fileName = locateLocal("data", resourceDir + "toolbars/"+oldDtd->toolbars[i]);
QuantaCommon::setUrl(urlLocal, fileName);
- if (newToolbars.contains(url) == 0)
+ if (newToolbars.tqcontains(url) == 0)
{
TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
@@ -3309,8 +3309,8 @@ bool QuantaApp::slotRemoveToolbar(const TQString& a_name)
name1.remove(" tab");
TQString name2 = name1;
name2.remove(TQRegExp("[\\s]\\([0-9]+\\)"));
- s2.replace(name1, name2);
- s2.replace(name1.lower(), name2.lower());
+ s2.tqreplace(name1, name2);
+ s2.tqreplace(name1.lower(), name2.lower());
}
bool useToolbarGUI = true;
if ( s1 != s2 /*|| actionsModified */)
@@ -3318,12 +3318,12 @@ bool QuantaApp::slotRemoveToolbar(const TQString& a_name)
int result;
if (p_toolbar->url.isEmpty())
{
- result = KMessageBox::warningYesNoCancel(this, i18n("<qt>Toolbar <b>%1</b> is new and unsaved. Do you want to save it before it is removed?</qt>").arg(p_toolbar->name),
+ result = KMessageBox::warningYesNoCancel(this, i18n("<qt>Toolbar <b>%1</b> is new and unsaved. Do you want to save it before it is removed?</qt>").tqarg(p_toolbar->name),
i18n("Save Toolbar"), KStdGuiItem::save(), KStdGuiItem::discard());
} else
{
FourButtonMessageBox dlg(this, 0, true);
- dlg.textLabel->setText(i18n("<qt>The toolbar <b>%1</b> was modified. Do you want to save it before it is removed?</qt>").arg(p_toolbar->name));
+ dlg.textLabel->setText(i18n("<qt>The toolbar <b>%1</b> was modified. Do you want to save it before it is removed?</qt>").tqarg(p_toolbar->name));
dlg.setCaption(i18n("Save Toolbar"));
dlg.pixmapLabel->setPixmap(BarIcon("messagebox_info", KIcon::SizeMedium));
dlg.exec();
@@ -3461,7 +3461,7 @@ void QuantaApp::slotBuildPrjToolbarsMenu()
if (Project::ref()->hasProject())
{
buildInProgress = true;
- toolbarList = QExtFileInfo::allFiles(Project::ref()->toolbarURL(), "*"+toolbarExtension, this);
+ toolbarList = TQExtFileInfo::allFiles(Project::ref()->toolbarURL(), "*"+toolbarExtension, this);
buildInProgress = false;
projectToolbarFiles->setMaxItems(toolbarList.count());
for (uint i = 0; i < toolbarList.count(); i++)
@@ -3542,7 +3542,7 @@ bool QuantaApp::allToolbarsHidden() const
void QuantaApp::slotLoadDTEP()
{
- TQString dirName = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select DTEP Directory"));
+ TQString dirName = KFileDialog::getExistingDirectory(TQString(), 0, i18n("Select DTEP Directory"));
if (!dirName.isEmpty())
{
DTDs::ref()->slotLoadDTEP(dirName, true);
@@ -3559,10 +3559,10 @@ TQString QuantaApp::createDTEPTarball()
bool ok = false;
TQString res = KInputDialog::getItem(
i18n( "Send DTD" ),
- i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
+ i18n( "Please select a DTD:" ), lst, lst.tqfindIndex(nickName), false, &ok, this );
if (!ok)
- return TQString::null;
+ return TQString();
TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
@@ -3570,17 +3570,17 @@ TQString QuantaApp::createDTEPTarball()
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- TQString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(TQRegExp("\\s|\\."), "_") + ".tgz";
+ TQString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).tqreplace(TQRegExp("\\s|\\."), "_") + ".tgz";
//pack the .tag files and the description.rc into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
tar.open(IO_WriteOnly);
KURL dirURL;
- dirURL.setPath(DTDs::ref()->find(dtdName)->fileName);
+ dirURL.setPath(DTDs::ref()->tqfind(dtdName)->fileName);
dirURL.setPath(dirURL.directory(false));
- KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this);
+ KURL::List files = TQExtFileInfo::allFilesRelative(dirURL, "*", this);
for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
TQString name = (*it_f).fileName();
@@ -3595,7 +3595,7 @@ TQString QuantaApp::createDTEPTarball()
tar.close();
return tempFileName;
}
- return TQString::null;
+ return TQString();
}
void QuantaApp::slotEmailDTEP()
@@ -3634,7 +3634,7 @@ void QuantaApp::slotEmailDTEP()
return;
}
- kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, dtdFile);
+ kapp->invokeMailer(toStr, TQString(), TQString(), subjectStr, message, TQString(), dtdFile);
}
delete mailDlg;
}
@@ -3643,7 +3643,7 @@ void QuantaApp::slotEmailDTEP()
void QuantaApp::slotDownloadDTEP()
{
if (!m_newDTEPStuff)
- m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this);
+ m_newDTEPStuff = new TQNewDTEPStuff("quanta/dtep", this);
m_newDTEPStuff->downloadResource();
}
@@ -3653,7 +3653,7 @@ void QuantaApp::slotUploadDTEP()
if (tempFileName.isNull())
return;
if (!m_newDTEPStuff)
- m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this);
+ m_newDTEPStuff = new TQNewDTEPStuff("quanta/dtep", this);
// tempDirList.append(m_newDTEPStuff->uploadResource(tempFileName));
m_newDTEPStuff->uploadResource(tempFileName);
}
@@ -3664,7 +3664,7 @@ void QuantaApp::slotSmartTagInsertion()
if(!action)
return;
if(!ViewManager::ref()->activeDocument() || !ViewManager::ref()->activeView() ||
- ViewManager::ref()->activeDocument()->defaultDTD()->name.contains("HTML", false) == 0)
+ ViewManager::ref()->activeDocument()->defaultDTD()->name.tqcontains("HTML", false) == 0)
{
KMessageBox::error(this, "Smart Tag Insertion is available only for (X)HTML for the moment.");
qConfig.smartTagInsertion = false;
@@ -3677,14 +3677,14 @@ void QuantaApp::slotSmartTagInsertion()
void QuantaApp::slotDownloadTemplate()
{
if (!m_newTemplateStuff)
- m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
+ m_newTemplateStuff = new TQNewTemplateStuff("quanta/template", this);
m_newTemplateStuff->downloadResource();
}
void QuantaApp::slotUploadTemplate(const TQString &fileName)
{
if (!m_newTemplateStuff)
- m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
+ m_newTemplateStuff = new TQNewTemplateStuff("quanta/template", this);
// tempDirList.append(m_newTemplateStuff->uploadResource(fileName));
m_newTemplateStuff->uploadResource(fileName);
}
@@ -3692,14 +3692,14 @@ void QuantaApp::slotUploadTemplate(const TQString &fileName)
void QuantaApp::slotDownloadScript()
{
if (!m_newScriptStuff)
- m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
+ m_newScriptStuff = new TQNewScriptStuff("quanta/script", this);
m_newScriptStuff->downloadResource();
}
void QuantaApp::slotUploadScript(const TQString &fileName)
{
if (!m_newScriptStuff)
- m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
+ m_newScriptStuff = new TQNewScriptStuff("quanta/script", this);
// tempDirList.append(m_newScriptStuff->uploadResource(fileName));
m_newScriptStuff->uploadResource(fileName);
}
@@ -3708,7 +3708,7 @@ void QuantaApp::slotDownloadDoc()
{
if (!m_newDocStuff)
{
- m_newDocStuff = new QNewDocStuff("quanta/documentation", this);
+ m_newDocStuff = new TQNewDocStuff("quanta/documentation", this);
connect(m_newDocStuff, TQT_SIGNAL(installFinished()), dTab, TQT_SLOT(slotRefreshTree()));
}
m_newDocStuff->downloadResource();
@@ -3736,7 +3736,7 @@ void QuantaApp::documentProperties(bool forceInsertionOfMinimalTree)
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- if (w->defaultDTD()->name.contains("HTML", false) == 0)
+ if (w->defaultDTD()->name.tqcontains("HTML", false) == 0)
{
KMessageBox::information(this, i18n("The Document Properties Dialog is only for HTML and XHTML."));
return;
@@ -3784,7 +3784,7 @@ TQStringList QuantaApp::openedURLs() const
Document *w = qView->document();
if ( w )
{
- list.prepend( TQString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
+ list.prepend( TQString("%1:%2").tqarg(w->editIf->editInterfaceNumber()).tqarg(w->url().url()));
}
}
}
@@ -3808,7 +3808,7 @@ void QuantaApp::slotExpandAbbreviation()
{
bool found = false;
Abbreviation abbrev = it.data();
- if (abbrev.dteps.contains(dtd->name))
+ if (abbrev.dteps.tqcontains(dtd->name))
{
TQMap<TQString, TQString>::ConstIterator it2;
for (it2 = abbrev.abbreviations.constBegin(); it2 != abbrev.abbreviations.constEnd(); ++it2)
@@ -3830,20 +3830,20 @@ void QuantaApp::slotExpandAbbreviation()
w->editIf->removeText(line, col - text.length() + 1, line, col);
w->activateParser(true);
col -= (text.length() - 1);
- int pos = textToInsert.find('|');
+ int pos = textToInsert.tqfind('|');
if (pos != -1)
{
text = textToInsert.left(pos);
- if (text.contains('\n'))
+ if (text.tqcontains('\n'))
{
- line += text.contains('\n');
- col = text.length() - text.findRev('\n') - 1;
+ line += text.tqcontains('\n');
+ col = text.length() - text.tqfindRev('\n') - 1;
} else
{
col += pos;
}
}
- textToInsert.replace('|',"");
+ textToInsert.tqreplace('|',"");
w->insertText(textToInsert, false);
w->viewCursorIf->setCursorPositionReal(line, col);
}
@@ -3957,7 +3957,7 @@ void QuantaApp::slotAutosaveTimer()
void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen)
{
TQCString tmp( buf, buflen + 1 );
- m_scriptOutput = TQString::null;
+ m_scriptOutput = TQString();
m_scriptOutput = TQString::fromLocal8Bit(tmp).remove(" ");
}
@@ -3980,7 +3980,7 @@ void QuantaApp::slotProcessTimeout()
{
if (m_loopStarted)
{
- qApp->exit_loop();
+ tqApp->exit_loop();
m_loopStarted = false;
}
}
@@ -4040,7 +4040,7 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
}
Tag *commentTag = n->tag;
TQString text = commentTag->tagStr();
- int pos = text.find("@annotation");
+ int pos = text.tqfind("@annotation");
if (pos != -1)
{
pos += 11;
@@ -4048,7 +4048,7 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
if (text[pos] == '(')
{
int p = pos;
- pos = text.find(')');
+ pos = text.tqfind(')');
if (pos != -1)
{
receiver = text.mid(p + 1, pos - p - 1);
@@ -4062,7 +4062,7 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
n->next->tag->beginPos(l, c);
else
n->tag->endPos(l, c);
- commentTag->write()->addAnnotation(l, qMakePair(text, receiver));
+ commentTag->write()->addAnnotation(l, tqMakePair(text, receiver));
}
}
node = node->nextSibling();
@@ -4074,7 +4074,7 @@ TQString QuantaApp::saveCurrentFile()
{
Document *w = ViewManager::ref()->activeDocument();
if (!w)
- return TQString::null;
+ return TQString();
if (w->isModified())
{
if ( KMessageBox::questionYesNo(this,
@@ -4094,7 +4094,7 @@ TQString QuantaApp::saveCurrentFile()
}
} else
{
- return TQString::null;
+ return TQString();
}
}
KURL url = Project::ref()->urlWithPrefix(w->url());
@@ -4160,7 +4160,7 @@ bool QuantaApp::queryClose()
{
saveOptions();
// kdDebug(24000) << "Quanta will exit" << endl;
- emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
+ emit eventHappened("quanta_exit", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate), TQString());
} else
slotFileNew();
return canExit;
@@ -4200,7 +4200,7 @@ void QuantaApp::saveOptions()
m_config->writeEntry("Smart Tag Insertion", qConfig.smartTagInsertion);
- m_config->writeEntry("Window layout", qConfig.windowLayout);
+ m_config->writeEntry("Window tqlayout", qConfig.windowLayout);
m_config->writeEntry("Follow Cursor", StructTreeView::ref()->followCursor() );
//If user choose the timer interval, it needs to restart the timer too
m_config->writeEntry("Autosave interval", qConfig.autosaveInterval);
@@ -4297,10 +4297,10 @@ void QuantaApp::slotEditCurrentTag()
if (dtd->family == Xml)
{
TQString currentLine = w->editIf->textLine(line);
- int sPos = currentLine.findRev('<', col);
+ int sPos = currentLine.tqfindRev('<', col);
if (sPos != -1)
{
- int ePos = currentLine.find('>', col);
+ int ePos = currentLine.tqfind('>', col);
if (ePos != -1)
{
AreaStruct area(line, sPos, line, ePos);
@@ -4327,7 +4327,7 @@ void QuantaApp::slotEditCurrentTag()
slotEnableIdleTimer(true);
if (isUnknown)
{
- TQString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").tqarg(tagName);
slotStatusMsg( message );
}
}
@@ -4442,21 +4442,21 @@ void QuantaApp::slotInsertCSS()
if (styleNode->tag->type == Tag::XmlTagEnd && styleNode->prev)
styleNode = styleNode->prev;
- while (styleNode && styleNode->parent && styleNode->tag->name.lower() != "style" && styleNode->tag->dtd()->name == "text/css")
- styleNode = styleNode->parent;
+ while (styleNode && styleNode->tqparent && styleNode->tag->name.lower() != "style" && styleNode->tag->dtd()->name == "text/css")
+ styleNode = styleNode->tqparent;
- Node *parentNode = node;
- if (parentNode->tag->type == Tag::XmlTagEnd && parentNode->prev)
- parentNode = parentNode->prev;
+ Node *tqparentNode = node;
+ if (tqparentNode->tag->type == Tag::XmlTagEnd && tqparentNode->prev)
+ tqparentNode = tqparentNode->prev;
else
- while (parentNode && parentNode->parent &&
- parentNode->tag->type != Tag::XmlTag)
- parentNode = parentNode->parent;
+ while (tqparentNode && tqparentNode->tqparent &&
+ tqparentNode->tag->type != Tag::XmlTag)
+ tqparentNode = tqparentNode->tqparent;
TQString fullDocument = w->editIf->text().stripWhiteSpace();
- if (styleNode->tag->name.lower() == "comment block" && styleNode->parent) {
- if (styleNode->parent->tag->name.lower() == "style") {
- styleNode = styleNode->parent;
+ if (styleNode->tag->name.lower() == "comment block" && styleNode->tqparent) {
+ if (styleNode->tqparent->tag->name.lower() == "style") {
+ styleNode = styleNode->tqparent;
}
}
@@ -4469,7 +4469,7 @@ void QuantaApp::slotInsertCSS()
styleNode->next->tag->beginPos(eLine, eCol);
TQString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
- kdDebug(24000) << "Style tag contains: " << endl << styleTagContent << endl;
+ kdDebug(24000) << "Style tag tqcontains: " << endl << styleTagContent << endl;
CSSSelector *dlg = new CSSSelector;
dlg->setCallingFrom("XHTML");
@@ -4513,29 +4513,29 @@ void QuantaApp::slotInsertCSS()
}
delete dlg;
} else
- if (parentNode && parentNode->tag->type == Tag::XmlTag)
+ if (tqparentNode && tqparentNode->tag->type == Tag::XmlTag)
{
- kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << parentNode->tag->name << endl;
+ kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << tqparentNode->tag->name << endl;
CSSEditor *dlg = new CSSEditor(this);
TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(projectBaseURL().path() + fi.baseName(),false);
- parentNode->tag->beginPos(bLine, bCol);
- parentNode->tag->endPos(eLine, eCol);
+ tqparentNode->tag->beginPos(bLine, bCol);
+ tqparentNode->tag->endPos(eLine, eCol);
dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol));
TQString temp;
- if (parentNode->tag->hasAttribute("style"))
+ if (tqparentNode->tag->hasAttribute("style"))
{
- dlg->setInlineStyleContent(parentNode->tag->attributeValue("style"));
- Tag tempTag(*(parentNode->tag));
+ dlg->setInlineStyleContent(tqparentNode->tag->attributeValue("style"));
+ Tag tempTag(*(tqparentNode->tag));
tempTag.deleteAttribute("style");
temp = tempTag.toString();
} else {
- dlg->setInlineStyleContent(TQString::null);
- temp = parentNode->tag->toString();
+ dlg->setInlineStyleContent(TQString());
+ temp = tqparentNode->tag->toString();
}
//using TQString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
temp = temp.left(temp.length()-1);//remove >
@@ -4545,7 +4545,7 @@ void QuantaApp::slotInsertCSS()
dlg->initialize();
if( dlg->exec() )
{
- w->changeTagAttribute(parentNode->tag, "style", dlg->generateProperties());
+ w->changeTagAttribute(tqparentNode->tag, "style", dlg->generateProperties());
}
delete dlg;
} else
@@ -4786,7 +4786,7 @@ void QuantaApp::slotViewInKFM()
}
if ( !w->isUntitled() )
{
- KProcess *show = new KProcess(this);
+ KProcess *show = new KProcess(TQT_TQOBJECT(this));
KURL url = Project::ref()->urlWithPrefix(w->url());
*show << "kfmclient" << "newTab" << url.url();
show->start( KProcess::DontCare );
@@ -4820,7 +4820,7 @@ void QuantaApp::slotViewInLynx()
}
if ( !w->isUntitled() )
{
- KProcess *show = new KProcess(this);
+ KProcess *show = new KProcess(TQT_TQOBJECT(this));
KURL url = Project::ref()->urlWithPrefix(w->url());
*show << "konsole"
<< "--nohist"
@@ -4840,15 +4840,15 @@ void QuantaApp::slotPasteHTMLQuoted()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QClipboard *cb = qApp->clipboard();
+ TQClipboard *cb = tqApp->tqclipboard();
TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
{
- text.replace( "&", "&amp;" );
- text.replace( "<", "&lt;" );
- text.replace( "\"", "&quot;" );
- text.replace( ">", "&gt;" );
+ text.tqreplace( "&", "&amp;" );
+ text.tqreplace( "<", "&lt;" );
+ text.tqreplace( "\"", "&quot;" );
+ text.tqreplace( ">", "&gt;" );
//TODO: Replace only the chars not present in the current encoding.
TQString encoding = defaultEncoding();
@@ -4860,16 +4860,16 @@ void QuantaApp::slotPasteHTMLQuoted()
for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
{
TQString s = *it;
- int begin = s.find("(&#") + 3;
+ int begin = s.tqfind("(&#") + 3;
if (begin == 1)
continue;
- int length = s.find(";)") - begin + 1;
+ int length = s.tqfind(";)") - begin + 1;
s = s.mid(begin, length - 1);
bool ok;
int code = s.toInt(&ok);
if (!ok || code < 191)
continue;
- text.replace(TQChar(code), TQString("&#%1;").arg(s));
+ text.tqreplace(TQChar(code), TQString("&#%1;").tqarg(s));
}
}
unsigned int line, col;
@@ -4885,7 +4885,7 @@ void QuantaApp::slotPasteURLEncoded()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QClipboard *cb = qApp->clipboard();
+ TQClipboard *cb = tqApp->tqclipboard();
TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
@@ -4907,7 +4907,7 @@ void QuantaApp::slotUndo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus && w)
{
/**MessageBox::information(this, i18n("VPL does not support this functionality yet."),
- TQString::null, "show undo unavailable");*/
+ TQString(), "show undo unavailable");*/
w->docUndoRedo->undo();
return;
}
@@ -4932,7 +4932,7 @@ void QuantaApp::slotRedo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
{
/**KMessageBox::information(this, i18n("VPL does not support this functionality yet."),
- TQString::null, "show redo unavailable");*/
+ TQString(), "show redo unavailable");*/
w->docUndoRedo->redo();
return;
}
@@ -4971,7 +4971,7 @@ void QuantaApp::slotCut()
{
/*
KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- TQString::null, "show cut unavailable");
+ TQString(), "show cut unavailable");
*/
KafkaDocument::ref()->slotCut();
return;
@@ -4991,7 +4991,7 @@ void QuantaApp::slotCopy()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //TQString::null, "show copy unavailable");
+ //TQString(), "show copy unavailable");
KafkaDocument::ref()->slotCopy();
return;
}
@@ -5004,15 +5004,15 @@ void QuantaApp::slotCopy()
if (m_htmlPart->view()->hasFocus())
{
TQString selection = m_htmlPart->selectedText();
- QClipboard *cb = TQApplication::clipboard();
- cb->setText(selection, QClipboard::Clipboard);
+ TQClipboard *cb = TQApplication::tqclipboard();
+ cb->setText(selection, TQClipboard::Clipboard);
}
else
if (m_htmlPartDoc->view()->hasFocus())
{
TQString selection = m_htmlPartDoc->selectedText();
- QClipboard *cb = TQApplication::clipboard();
- cb->setText(selection, QClipboard::Clipboard);
+ TQClipboard *cb = TQApplication::tqclipboard();
+ cb->setText(selection, TQClipboard::Clipboard);
}
}
@@ -5024,7 +5024,7 @@ void QuantaApp::slotPaste()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //TQString::null, "show paste unavailable");
+ //TQString(), "show paste unavailable");
KafkaDocument::ref()->slotPaste();
return;
}
@@ -5120,9 +5120,9 @@ void QuantaApp::slotFileClosed(Document *w)
if (w)
{
KURL url = w->url();
- if (Project::ref()->hasProject() && Project::ref()->contains(url))
+ if (Project::ref()->hasProject() && Project::ref()->tqcontains(url))
{
- KURL u = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL());
+ KURL u = TQExtFileInfo::toRelative(url, Project::ref()->projectBaseURL());
m_annotationOutput->writeAnnotations(QuantaCommon::qUrl(u), w->annotations());
}
}
@@ -5134,9 +5134,9 @@ void QuantaApp::slotCVSCommandExecuted(const TQString& command, const TQStringLi
for (uint i = 0; i < files.count(); i++)
{
file = files[i];
- if (Project::ref()->contains(KURL::fromPathOrURL(file)))
+ if (Project::ref()->tqcontains(KURL::fromPathOrURL(file)))
{
- emit eventHappened("after_" + command, file, TQString::null);
+ emit eventHappened("after_" + command, file, TQString());
}
}
}