From 1fffbdafa12271a1a635caf46777fb8acfb6f31b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 10:00:36 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076. --- kommander/editor/mainwindow.cpp | 70 ++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'kommander/editor/mainwindow.cpp') diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index 67d1e311..22969a3b 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include #include @@ -368,7 +368,7 @@ int MainWindow::currentTool() const { if (!actionCurrentTool) return POINTER_TOOL; - return TQString::fromLatin1(actionCurrentTool->name()).toInt(); + return TQString::tqfromLatin1(actionCurrentTool->name()).toInt(); } void MainWindow::slotCreateBackups() @@ -392,7 +392,7 @@ void MainWindow::slotCreateBackups() form->formFile()->setModified(true); if (!form->formFile()->save(false)) { - KMessageBox::error(this, i18n("Cannot create backup file %1.").arg(backupName)); + KMessageBox::error(this, i18n("Cannot create backup file %1.").tqarg(backupName)); } form->formFile()->setFileName(fileName); form->formFile()->setModified(modified); @@ -436,7 +436,7 @@ void MainWindow::runForm() ::stat(m_fileName.local8Bit(), &statbuf); if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("Cannot create temporary file %1.").arg(m_backupName)); + KMessageBox::error(this, i18n("Cannot create temporary file %1.").tqarg(m_backupName)); return; } form->formFile()->setFileName(m_fileName); @@ -446,12 +446,12 @@ void MainWindow::runForm() { if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("Cannot create backup file %1.").arg(m_fileName + ".backup")); + KMessageBox::error(this, i18n("Cannot create backup file %1.").tqarg(m_fileName + ".backup")); } ::chmod(m_fileName.local8Bit(), S_IRWXU); KProcess* process = new KProcess; process->setUseShell(true); - (*process) << "kmdr-executor" << TQString("\"%1\"").arg(form->formFile()->fileName()); + (*process) << "kmdr-executor" << TQString("\"%1\"").tqarg(form->formFile()->fileName()); connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog, TQT_SLOT(receivedStdout(KProcess*, char*, int))); connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog, @@ -500,7 +500,7 @@ void MainWindow::runForm4() ::stat(m_fileName.local8Bit(), &statbuf); if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("Cannot create temporary file %1.").arg(m_backupName)); + KMessageBox::error(this, i18n("Cannot create temporary file %1.").tqarg(m_backupName)); return; } form->formFile()->setFileName(m_fileName); @@ -510,12 +510,12 @@ void MainWindow::runForm4() { if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true)) { - KMessageBox::error(this, i18n("Cannot create backup file %1.").arg(m_fileName + ".backup")); + KMessageBox::error(this, i18n("Cannot create backup file %1.").tqarg(m_fileName + ".backup")); } ::chmod(m_fileName.local8Bit(), S_IRWXU); KProcess* process = new KProcess; process->setUseShell(true); - (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName()); + (*process) << "kommander" << TQString("\"%1\"").tqarg(form->formFile()->fileName()); connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog, TQT_SLOT(receivedStdout(KProcess*, char*, int))); connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog, @@ -848,7 +848,7 @@ void MainWindow::insertFormWindow(FormWindow *fw) { if (fw) TQWhatsThis::add(fw, i18n("The Form Window" - "

Use the various tools to add widgets or to change the layout " + "

Use the various tools to add widgets or to change the tqlayout " "and behavior of the components in the form. Select one or multiple " "widgets to move them or lay them out. If a single widget is chosen it can " "be resized using the resize handles.

" @@ -952,11 +952,11 @@ void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable, actionEditUndo->setEnabled(undoAvailable); actionEditRedo->setEnabled(redoAvailable); if (!undoCmd.isEmpty()) - actionEditUndo->setText(i18n("&Undo: %1").arg(undoCmd)); + actionEditUndo->setText(i18n("&Undo: %1").tqarg(undoCmd)); else actionEditUndo->setText(i18n("&Undo: Not Available")); if (!redoCmd.isEmpty()) - actionEditRedo->setText(i18n("&Redo: %1").arg(redoCmd)); + actionEditRedo->setText(i18n("&Redo: %1").tqarg(redoCmd)); else actionEditRedo->setText(i18n("&Redo: Not Available")); @@ -1012,18 +1012,18 @@ void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidge void MainWindow::setupRMBProperties(TQValueList &ids, TQMap &props, TQWidget *w) { - const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); + const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); if (text && qstrcmp(text->type(), TQSTRING_OBJECT_NAME_STRING) != 0) text = 0; - const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true); + const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); if (title && qstrcmp(title->type(), TQSTRING_OBJECT_NAME_STRING) != 0) title = 0; const TQMetaProperty* pagetitle = - w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pageTitle", true), true); if (pagetitle && qstrcmp(pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0) pagetitle = 0; const TQMetaProperty* pixmap = - w->metaObject()->property(w->metaObject()->findProperty("pixmap", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pixmap", true), true); if (pixmap && qstrcmp(pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0) pixmap = 0; @@ -1153,7 +1153,7 @@ void MainWindow::handleRMBProperties(int id, TQMap &props, TQWidg text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this); } if (ok) { - TQString pn(i18n("Set the 'text' of '%1'").arg(w->name())); + TQString pn(i18n("Set the 'text' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "text", w->property("text"), text, TQString(), TQString()); @@ -1165,7 +1165,7 @@ void MainWindow::handleRMBProperties(int id, TQMap &props, TQWidg bool ok = false; TQString title = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this); if (ok) { - TQString pn(i18n("Set the 'title' of '%1'").arg(w->name())); + TQString pn(i18n("Set the 'title' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "title", w->property("title"), title, TQString(), TQString()); @@ -1177,7 +1177,7 @@ void MainWindow::handleRMBProperties(int id, TQMap &props, TQWidg bool ok = false; TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this); if (ok) { - TQString pn(i18n("Set the 'pageTitle' of '%1'").arg(w->name())); + TQString pn(i18n("Set the 'pageTitle' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "pageTitle", w->property("pageTitle"), text, TQString(), TQString()); @@ -1189,7 +1189,7 @@ void MainWindow::handleRMBProperties(int id, TQMap &props, TQWidg TQPixmap oldPix = TQVariant(w->property("pixmap")).toPixmap(); TQPixmap pix = qChoosePixmap(this, formWindow(), oldPix); if (!pix.isNull()) { - TQString pn(i18n("Set the 'pixmap' of '%1'").arg(w->name())); + TQString pn(i18n("Set the 'pixmap' of '%1'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "pixmap", w->property("pixmap"), pix, TQString(), TQString()); @@ -1214,7 +1214,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands if (w->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) { TQTabWidget *tw = (TQTabWidget*)w; if (id == commands[ "add" ]) { - AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(), + AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(), tw, "Tab"); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1222,7 +1222,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands if (tw->currentPage()) { QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2"). - arg(dtw->pageTitle()).arg(tw->name()), + tqarg(dtw->pageTitle()).tqarg(tw->name()), formWindow(), tw, tw->currentPage()); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1232,7 +1232,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands if (w->inherits(TQTOOLBOX_OBJECT_NAME_STRING)) { TQToolBox *tw = (TQToolBox*)w; if (id == commands[ "add" ]) { - AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(), + AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(), tw, "Page"); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1240,7 +1240,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands if (tw->currentItem()) { EditorToolBox *dtw = (EditorToolBox*)tw; DeleteToolBoxPageCommand *cmd = new DeleteToolBoxPageCommand(i18n("Delete Page %1 of %2"). - arg(dtw->pageTitle()).arg(tw->name()), + tqarg(dtw->pageTitle()).tqarg(tw->name()), formWindow(), tw, tw->currentItem()); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1267,7 +1267,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands if (fw->mainContainer()->inherits(TQWIZARD_OBJECT_NAME_STRING)) { TQWizard *wiz = (TQWizard*)fw->mainContainer(); if (id == commands[ "add" ]) { - AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(), + AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").tqarg(wiz->name()), formWindow(), wiz, "Page"); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1275,7 +1275,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands if (wiz->currentPage()) { QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2"). - arg(dw->pageTitle()).arg(wiz->name()), + tqarg(dw->pageTitle()).tqarg(wiz->name()), formWindow(), wiz, wiz->indexOf(wiz->currentPage())); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); @@ -1290,7 +1290,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands QDesignerWizard *dw = (QDesignerWizard*)wiz; TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this); if (ok) { - TQString pn(i18n("Rename page %1 of %2").arg(dw->pageTitle()).arg(wiz->name())); + TQString pn(i18n("Rename page %1 of %2").tqarg(dw->pageTitle()).tqarg(wiz->name())); RenameWizardPageCommand *cmd = new RenameWizardPageCommand(pn, formWindow() , wiz, wiz->indexOf(wiz->currentPage()), text); formWindow()->commandHistory()->addCommand(cmd); @@ -1300,11 +1300,11 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands } else if (fw->mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) { TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); if (id == commands[ "add_toolbar" ]) { - AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").arg(formWindow()->name()), formWindow(), mw); + AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").tqarg(formWindow()->name()), formWindow(), mw); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); } else if (id == commands[ "add_menu_item" ]) { - AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").arg(formWindow()->name()), formWindow(), mw); + AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").tqarg(formWindow()->name()), formWindow(), mw); formWindow()->commandHistory()->addCommand(cmd); cmd->execute(); } @@ -1621,14 +1621,14 @@ ActionEditor *MainWindow::actioneditor() const bool MainWindow::openEditor(TQWidget* w, FormWindow*) { if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) { - statusBar()->message(i18n("Edit %1...").arg(w->className())); + statusBar()->message(i18n("Edit %1...").tqarg(w->className())); WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow()); statusBar()->clear(); return true; } - const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); - const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true); + const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); + const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); if (text && text->designable(w)) { bool ok = false; TQString text; @@ -1639,7 +1639,7 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this); } if (ok) { - TQString pn(i18n("Set the 'text' of '%2'").arg(w->name())); + TQString pn(i18n("Set the 'text' of '%2'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "text", w->property("text"), text, TQString(), TQString()); @@ -1654,7 +1654,7 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*) TQString text; text = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this); if (ok) { - TQString pn(i18n("Set the 'title' of '%2'").arg(w->name())); + TQString pn(i18n("Set the 'title' of '%2'").tqarg(w->name())); SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "title", w->property("title"), text, TQString(), TQString()); @@ -1756,7 +1756,7 @@ void MainWindow::checkTempFiles() void MainWindow::showDialogHelp() { TQWidget *w = (TQWidget*)sender(); - w = w->topLevelWidget(); + w = w->tqtopLevelWidget(); TQString link = "designer-manual-12.html#"; -- cgit v1.2.1