From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- buildtools/autotools/subprojectoptionsdlg.cpp | 134 +++++++++++++------------- 1 file changed, 67 insertions(+), 67 deletions(-) (limited to 'buildtools/autotools/subprojectoptionsdlg.cpp') diff --git a/buildtools/autotools/subprojectoptionsdlg.cpp b/buildtools/autotools/subprojectoptionsdlg.cpp index 5ad6bf10..a7fd2c11 100644 --- a/buildtools/autotools/subprojectoptionsdlg.cpp +++ b/buildtools/autotools/subprojectoptionsdlg.cpp @@ -11,14 +11,14 @@ #include "subprojectoptionsdlg.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -42,7 +42,7 @@ SubprojectOptionsDialog::SubprojectOptionsDialog(AutoProjectPart *part, AutoProjectWidget *widget, - SubprojectItem *item, QWidget *parent, const char *name) + SubprojectItem *item, TQWidget *parent, const char *name) : SubprojectOptionsDialogBase(parent, name, true) { setCaption(i18n("Subproject Options for '%1'").arg(item->subdir)); @@ -50,14 +50,14 @@ SubprojectOptionsDialog::SubprojectOptionsDialog(AutoProjectPart *part, AutoProj subProject = item; m_part = part; - QFontMetrics fm(cflags_edit->fontMetrics()); + TQFontMetrics fm(cflags_edit->fontMetrics()); int wid = fm.width('X')*35; cflags_edit->setMinimumWidth(wid); cxxflags_edit->setMinimumWidth(wid); fflags_edit->setMinimumWidth(wid); - QDomDocument &dom = *part->projectDom(); - QString prefix = "/kdevautoproject/configurations/" + m_part->currentBuildConfig() + "/"; + TQDomDocument &dom = *part->projectDom(); + TQString prefix = "/kdevautoproject/configurations/" + m_part->currentBuildConfig() + "/"; ccompiler = DomUtil::readEntry(dom, prefix + "ccompiler", "kdevgccoptions"); cxxcompiler = DomUtil::readEntry(dom, prefix + "cxxcompiler", "kdevgppoptions"); @@ -79,20 +79,20 @@ SubprojectOptionsDialog::SubprojectOptionsDialog(AutoProjectPart *part, AutoProj prefix_listview->setSorting(-1); buildorder_listview->setSorting(-1); - connect( prefix_listview, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), this, SLOT( editPrefixClicked() ) ); + connect( prefix_listview, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), this, TQT_SLOT( editPrefixClicked() ) ); // Insert all subdirectories as possible include directories - QStringList l = widget->allSubprojects(); - QCheckListItem *lastItem = 0; - QStringList::ConstIterator it; + TQStringList l = widget->allSubprojects(); + TQCheckListItem *lastItem = 0; + TQStringList::ConstIterator it; for (it = l.begin(); it != l.end(); ++it) { kdDebug(9020) << "----------> subproject = " << (*it) << endl; - QString subProjectName = *it; + TQString subProjectName = *it; if( subProjectName.isEmpty() ){ - subProjectName = QString::fromLatin1( "." ); + subProjectName = TQString::fromLatin1( "." ); } - QCheckListItem *clitem = new QCheckListItem(insideinc_listview, subProjectName, QCheckListItem::CheckBox); + TQCheckListItem *clitem = new TQCheckListItem(insideinc_listview, subProjectName, TQCheckListItem::CheckBox); if (lastItem) clitem->moveItem(lastItem); lastItem = clitem; @@ -117,38 +117,38 @@ void SubprojectOptionsDialog::readConfig() metasources_checkbox->setChecked(subProject->variables["METASOURCES"].stripWhiteSpace() == "AUTO"); - QString includes = subProject->variables["INCLUDES"]; - QStringList includeslist = QStringList::split(QRegExp("[ \t]"), QString(includes)); + TQString includes = subProject->variables["INCLUDES"]; + TQStringList includeslist = TQStringList::split(TQRegExp("[ \t]"), TQString(includes)); - QListViewItem *lastItem = 0; - QStringList::Iterator it; + TQListViewItem *lastItem = 0; + TQStringList::Iterator it; for (it = includeslist.begin(); it != includeslist.end(); ++it) { - QCheckListItem *clitem = static_cast(insideinc_listview->firstChild()); + TQCheckListItem *clitem = static_cast(insideinc_listview->firstChild()); while (clitem) { if (*it == ("-I$(top_srcdir)/" + clitem->text())) { clitem->setOn(true); break; } - clitem = static_cast(clitem->nextSibling()); + clitem = static_cast(clitem->nextSibling()); } if (!clitem) { - QListViewItem *item = new QListViewItem(outsideinc_listview, *it); + TQListViewItem *item = new TQListViewItem(outsideinc_listview, *it); if (lastItem) item->moveItem(lastItem); lastItem = item; } } - QMap::ConstIterator it2; + TQMap::ConstIterator it2; for (it2 = subProject->prefixes.begin(); it2 != subProject->prefixes.end(); ++it2) - new QListViewItem(prefix_listview, it2.key(), it2.data()); + new TQListViewItem(prefix_listview, it2.key(), it2.data()); - QString subdirs = subProject->variables["SUBDIRS"]; + TQString subdirs = subProject->variables["SUBDIRS"]; kdDebug(9020) << "Subdirs variable: " << subdirs << endl; - QStringList subdirslist = QStringList::split(QRegExp("[ \t]"), QString(subdirs)); + TQStringList subdirslist = TQStringList::split(TQRegExp("[ \t]"), TQString(subdirs)); lastItem = 0; for (it = subdirslist.begin(); it != subdirslist.end(); ++it) { - QListViewItem *item = new QListViewItem(buildorder_listview, *it); + TQListViewItem *item = new TQListViewItem(buildorder_listview, *it); if (lastItem) item->moveItem(lastItem); lastItem = item; @@ -158,67 +158,67 @@ void SubprojectOptionsDialog::readConfig() void SubprojectOptionsDialog::storeConfig() { - QMap replaceMap; + TQMap replaceMap; - QString old_cflags = subProject->variables["AM_CFLAGS"]; - QString new_cflags = cflags_edit->text(); + TQString old_cflags = subProject->variables["AM_CFLAGS"]; + TQString new_cflags = cflags_edit->text(); if (new_cflags != old_cflags) { subProject->variables["AM_CFLAGS"] = new_cflags; replaceMap.insert("AM_CFLAGS", new_cflags); } - QString old_cxxflags = subProject->variables["AM_CXXFLAGS"]; - QString new_cxxflags = cxxflags_edit->text(); + TQString old_cxxflags = subProject->variables["AM_CXXFLAGS"]; + TQString new_cxxflags = cxxflags_edit->text(); if (new_cxxflags != old_cxxflags) { subProject->variables["AM_CXXFLAGS"] = new_cxxflags; replaceMap.insert("AM_CXXFLAGS", new_cxxflags); } - QString old_fflags = subProject->variables["AM_FFLAGS"]; - QString new_fflags = fflags_edit->text(); + TQString old_fflags = subProject->variables["AM_FFLAGS"]; + TQString new_fflags = fflags_edit->text(); if (new_fflags != old_fflags) { subProject->variables["AM_FFLAGS"] = new_fflags; replaceMap.insert("AM_FFLAGS", new_fflags); } - QString old_metasources = subProject->variables["METASOURCES"]; - QString new_metasources = metasources_checkbox->isChecked() ? QString::fromLatin1("AUTO") : QString::null; + TQString old_metasources = subProject->variables["METASOURCES"]; + TQString new_metasources = metasources_checkbox->isChecked() ? TQString::fromLatin1("AUTO") : TQString::null; if (new_metasources != old_metasources) { subProject->variables["METASOURCES"] = new_metasources; replaceMap.insert("METASOURCES", new_metasources); } - QStringList includeslist; - QCheckListItem *clitem = static_cast(insideinc_listview->firstChild()); + TQStringList includeslist; + TQCheckListItem *clitem = static_cast(insideinc_listview->firstChild()); while (clitem) { if (clitem->isOn()) includeslist.append("-I$(top_srcdir)/" + clitem->text()); - clitem = static_cast(clitem->nextSibling()); + clitem = static_cast(clitem->nextSibling()); } - clitem = static_cast(outsideinc_listview->firstChild()); + clitem = static_cast(outsideinc_listview->firstChild()); while (clitem) { includeslist.append(clitem->text()); - clitem = static_cast(clitem->nextSibling()); + clitem = static_cast(clitem->nextSibling()); } - QString includes = includeslist.join(" "); + TQString includes = includeslist.join(" "); subProject->variables["INCLUDES"] = includes; replaceMap.insert("INCLUDES", includes); subProject->prefixes.clear(); - for (QListViewItem *item = prefix_listview->firstChild(); + for (TQListViewItem *item = prefix_listview->firstChild(); item; item = item->nextSibling()) { - QString key = item->text(0); - QString data = item->text(1); + TQString key = item->text(0); + TQString data = item->text(1); subProject->prefixes[key] = data; replaceMap.insert(key + "dir", data); } /// \FIXME take removed prefixes into account - QStringList subdirslist; - for (QListViewItem *item = buildorder_listview->firstChild(); + TQStringList subdirslist; + for (TQListViewItem *item = buildorder_listview->firstChild(); item; item = item->nextSibling()) subdirslist.append(item->text(0)); - QString subdirs = subdirslist.join(" "); + TQString subdirs = subdirslist.join(" "); kdDebug() << "New subdirs variable: " << subdirs << endl; subProject->variables["SUBDIRS"] = subdirs; replaceMap.insert("SUBDIRS", subdirs); @@ -229,7 +229,7 @@ void SubprojectOptionsDialog::storeConfig() void SubprojectOptionsDialog::cflagsClicked() { - QString new_cflags = AutoProjectTool::execFlagsDialog(ccompiler, cflags_edit->text(), this); + TQString new_cflags = AutoProjectTool::execFlagsDialog(ccompiler, cflags_edit->text(), this); // if (!new_cflags.isNull()) cflags_edit->setText(new_cflags); } @@ -237,7 +237,7 @@ void SubprojectOptionsDialog::cflagsClicked() void SubprojectOptionsDialog::cxxFlagsClicked() { - QString new_cxxflags = AutoProjectTool::execFlagsDialog(cxxcompiler, cxxflags_edit->text(), this); + TQString new_cxxflags = AutoProjectTool::execFlagsDialog(cxxcompiler, cxxflags_edit->text(), this); // if (!new_cxxflags.isNull()) cxxflags_edit->setText(new_cxxflags); } @@ -245,7 +245,7 @@ void SubprojectOptionsDialog::cxxFlagsClicked() void SubprojectOptionsDialog::fflagsClicked() { - QString new_fflags = AutoProjectTool::execFlagsDialog(f77compiler, fflags_edit->text(), this); + TQString new_fflags = AutoProjectTool::execFlagsDialog(f77compiler, fflags_edit->text(), this); // if (!new_fflags.isNull()) fflags_edit->setText(new_fflags); } @@ -258,7 +258,7 @@ void SubprojectOptionsDialog::insideMoveUpClicked() return; } - QListViewItem *item = insideinc_listview->firstChild(); + TQListViewItem *item = insideinc_listview->firstChild(); while (item->nextSibling() != insideinc_listview->currentItem()) item = item->nextSibling(); item->moveItem(insideinc_listview->currentItem()); @@ -283,7 +283,7 @@ void SubprojectOptionsDialog::outsideMoveUpClicked() return; } - QListViewItem *item = outsideinc_listview->firstChild(); + TQListViewItem *item = outsideinc_listview->firstChild(); while (item->nextSibling() != outsideinc_listview->currentItem()) item = item->nextSibling(); item->moveItem(outsideinc_listview->currentItem()); @@ -304,19 +304,19 @@ void SubprojectOptionsDialog::outsideAddClicked() { KURLRequesterDlg dialog( "", i18n( "Add Include directory: Choose directory, give -Idirectory or use a variable with -I$(FOOBAR)" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); - dialog.urlRequester() ->setURL( QString::null ); - if ( dialog.exec() != QDialog::Accepted ) + dialog.urlRequester() ->setURL( TQString::null ); + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString file = dialog.urlRequester() ->url(); + TQString file = dialog.urlRequester() ->url(); if ( !file.isEmpty() ) { if ( !file.isEmpty() ) { if( file.startsWith("-I") ) - new QListViewItem( outsideinc_listview, file ); + new TQListViewItem( outsideinc_listview, file ); else { - new QListViewItem( outsideinc_listview, "-I"+file ); + new TQListViewItem( outsideinc_listview, "-I"+file ); } } } @@ -328,7 +328,7 @@ void SubprojectOptionsDialog::outsideEditClicked() if ( (outsideinc_listview->childCount()==0) || (outsideinc_listview->currentItem() == 0) ) return; bool ok; - QString dir = KInputDialog::getText(i18n("Edit Include Directory"), i18n("Edit include directory:"), + TQString dir = KInputDialog::getText(i18n("Edit Include Directory"), i18n("Edit include directory:"), outsideinc_listview->currentItem()-> text(0), &ok, 0); if (ok && !dir.isEmpty()) outsideinc_listview->currentItem()-> setText(0, dir); @@ -347,13 +347,13 @@ void SubprojectOptionsDialog::addPrefixClicked() if (!dlg.exec() || dlg.name().isEmpty() || dlg.path().isEmpty() ) return; - new QListViewItem(prefix_listview, dlg.name(), dlg.path()); + new TQListViewItem(prefix_listview, dlg.name(), dlg.path()); } void SubprojectOptionsDialog::editPrefixClicked() { - QListViewItem* lvItem = prefix_listview->currentItem(); + TQListViewItem* lvItem = prefix_listview->currentItem(); if ( (prefix_listview->childCount()==0) || (lvItem == 0) ) return; AddPrefixDialog dlg(lvItem-> text(0), lvItem-> text(1)); @@ -377,7 +377,7 @@ void SubprojectOptionsDialog::buildorderMoveUpClicked() return; } - QListViewItem *item = buildorder_listview->firstChild(); + TQListViewItem *item = buildorder_listview->firstChild(); while (item->nextSibling() != buildorder_listview->currentItem()) item = item->nextSibling(); item->moveItem(buildorder_listview->currentItem()); @@ -398,7 +398,7 @@ void SubprojectOptionsDialog::buildorderMoveDownClicked() void SubprojectOptionsDialog::accept() { storeConfig(); - QDialog::accept(); + TQDialog::accept(); } #include "subprojectoptionsdlg.moc" -- cgit v1.2.1