diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/autotools/targetoptionsdlg.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/autotools/targetoptionsdlg.cpp')
-rw-r--r-- | buildtools/autotools/targetoptionsdlg.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/buildtools/autotools/targetoptionsdlg.cpp b/buildtools/autotools/targetoptionsdlg.cpp index c8d49c55..39cd35f2 100644 --- a/buildtools/autotools/targetoptionsdlg.cpp +++ b/buildtools/autotools/targetoptionsdlg.cpp @@ -11,11 +11,11 @@ #include "targetoptionsdlg.h" -#include <qcheckbox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qregexp.h> +#include <tqcheckbox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqregexp.h> #include <klineedit.h> #include <kbuttonbox.h> #include <kdialog.h> @@ -34,7 +34,7 @@ #include "urlutil.h" TargetOptionsDialog::TargetOptionsDialog(AutoProjectWidget *widget, TargetItem *item, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : TargetOptionsDialogBase(parent, name, true) { setCaption( i18n("Target Options for '%1'").arg(item->name) ); @@ -61,13 +61,13 @@ TargetOptionsDialog::TargetOptionsDialog(AutoProjectWidget *widget, TargetItem * m_cwdEdit->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); // Insert all convenience libraries as possible linked libraries - QStringList l = widget->allLibraries(); - QStringList::ConstIterator it; - QString fulltargetname = m_widget->subprojectDirectory() + "/" + item->name; + TQStringList l = widget->allLibraries(); + TQStringList::ConstIterator it; + TQString fulltargetname = m_widget->subprojectDirectory() + "/" + item->name; for (it = l.begin(); it != l.end(); ++it) // Do not list the target itself (a target can not link with itself) if ( !fulltargetname.endsWith(*it) ) - (void) new QCheckListItem(insidelib_listview, *it, QCheckListItem::CheckBox); + (void) new TQCheckListItem(insidelib_listview, *it, TQCheckListItem::CheckBox); readConfig(); } @@ -78,10 +78,10 @@ TargetOptionsDialog::~TargetOptionsDialog() void TargetOptionsDialog::readConfig() { - QString flagsstr = target->ldflags; - flagsstr.replace(QRegExp("$(KDE_PLUGIN)"), "-avoid-version -module -no-undefined $(KDE_RPATH)"); - QStringList l1 = QStringList::split(QRegExp("[ \t]"), flagsstr); - QStringList::Iterator l1it; + TQString flagsstr = target->ldflags; + flagsstr.replace(TQRegExp("$(KDE_PLUGIN)"), "-avoid-version -module -no-undefined $(KDE_RPATH)"); + TQStringList l1 = TQStringList::split(TQRegExp("[ \t]"), flagsstr); + TQStringList::Iterator l1it; l1it = l1.find("-all-static"); if (l1it != l1.end()) { @@ -106,18 +106,18 @@ void TargetOptionsDialog::readConfig() ldflagsother_edit->setText(l1.join(" ")); dependencies_edit->setText(target->dependencies); - QString addstr = (target->primary == "PROGRAMS")? target->ldadd : target->libadd; - QStringList l2 = QStringList::split(QRegExp("[ \t]"), addstr); + TQString addstr = (target->primary == "PROGRAMS")? target->ldadd : target->libadd; + TQStringList l2 = TQStringList::split(TQRegExp("[ \t]"), addstr); kdDebug(9020) << "ls=: " << addstr << endl; bool inlistItem; - QListViewItem *lastItem = 0; - QStringList::Iterator l2it; - QCheckListItem *flitem = static_cast<QCheckListItem*>(insidelib_listview->firstChild()); + TQListViewItem *lastItem = 0; + TQStringList::Iterator l2it; + TQCheckListItem *flitem = static_cast<TQCheckListItem*>(insidelib_listview->firstChild()); for (l2it = l2.begin(); l2it != l2.end(); ++l2it) { inlistItem = false; - QCheckListItem *clitem = static_cast<QCheckListItem*>(insidelib_listview->firstChild()); + TQCheckListItem *clitem = static_cast<TQCheckListItem*>(insidelib_listview->firstChild()); if (flitem) { while (clitem) { if (*l2it == ("$(top_builddir)/" + clitem->text())) { @@ -126,15 +126,15 @@ void TargetOptionsDialog::readConfig() if (flitem != clitem) clitem->moveItem(flitem); // move the "top of the list" one item down - flitem = static_cast<QCheckListItem*>(flitem->nextSibling()); + flitem = static_cast<TQCheckListItem*>(flitem->nextSibling()); inlistItem = true; break; } - clitem = static_cast<QCheckListItem*>(clitem->nextSibling()); + clitem = static_cast<TQCheckListItem*>(clitem->nextSibling()); } } if ( inlistItem == false ) { - QListViewItem *item = new QListViewItem(outsidelib_listview, *l2it); + TQListViewItem *item = new TQListViewItem(outsidelib_listview, *l2it); if (lastItem) item->moveItem(lastItem); lastItem = item; @@ -160,7 +160,7 @@ void TargetOptionsDialog::readConfig() void TargetOptionsDialog::storeConfig() { - QStringList flagslist; + TQStringList flagslist; if (allstatic_box->isChecked()) flagslist.append("-all-static"); if (avoidversion_box->isChecked()) @@ -170,27 +170,27 @@ void TargetOptionsDialog::storeConfig() if (noundefined_box->isChecked()) flagslist.append("-no-undefined"); flagslist.append(ldflagsother_edit->text()); - QString new_ldflags = flagslist.join(" "); + TQString new_ldflags = flagslist.join(" "); - QStringList liblist; - QCheckListItem *clitem = static_cast<QCheckListItem*>(insidelib_listview->firstChild()); + TQStringList liblist; + TQCheckListItem *clitem = static_cast<TQCheckListItem*>(insidelib_listview->firstChild()); while (clitem) { if( clitem->isOn() ) liblist.append("$(top_builddir)/" + clitem->text()); - clitem = static_cast<QCheckListItem*>(clitem->nextSibling()); + clitem = static_cast<TQCheckListItem*>(clitem->nextSibling()); } - clitem = static_cast<QCheckListItem*>(outsidelib_listview->firstChild()); + clitem = static_cast<TQCheckListItem*>(outsidelib_listview->firstChild()); while (clitem) { liblist.append(clitem->text()); - clitem = static_cast<QCheckListItem*>(clitem->nextSibling()); + clitem = static_cast<TQCheckListItem*>(clitem->nextSibling()); } - QString new_addstr = liblist.join(" "); + TQString new_addstr = liblist.join(" "); - QString canonname = AutoProjectTool::canonicalize(target->name); - QMap<QString, QString> replaceMap; + TQString canonname = AutoProjectTool::canonicalize(target->name); + TQMap<TQString, TQString> replaceMap; if (target->primary == "PROGRAMS") { - QString old_ldadd = target->ldadd; + TQString old_ldadd = target->ldadd; if (new_addstr != old_ldadd) { target->ldadd = new_addstr; replaceMap.insert(canonname + "_LDADD", new_addstr); @@ -198,21 +198,21 @@ void TargetOptionsDialog::storeConfig() } if (target->primary == "LIBRARIES" || target->primary == "LTLIBRARIES") { - QString old_libadd = target->libadd; + TQString old_libadd = target->libadd; if (new_addstr != old_libadd) { target->libadd = new_addstr; replaceMap.insert(canonname + "_LIBADD", new_addstr); } } - QString old_ldflags = target->ldflags; + TQString old_ldflags = target->ldflags; if (new_ldflags != old_ldflags) { target->ldflags = new_ldflags; replaceMap.insert(canonname + "_LDFLAGS", new_ldflags); } - QString new_dependencies = dependencies_edit->text(); - QString old_dependencies = target->dependencies; + TQString new_dependencies = dependencies_edit->text(); + TQString old_dependencies = target->dependencies; if (new_dependencies != old_dependencies) { target->dependencies = new_dependencies; if (!new_dependencies.isEmpty()) @@ -240,7 +240,7 @@ void TargetOptionsDialog::insideMoveUpClicked() return; } - QListViewItem *item = insidelib_listview->firstChild(); + TQListViewItem *item = insidelib_listview->firstChild(); while (item->nextSibling() != insidelib_listview->currentItem()) item = item->nextSibling(); item->moveItem(insidelib_listview->currentItem()); @@ -270,7 +270,7 @@ void TargetOptionsDialog::outsideMoveUpClicked() return; } - QListViewItem *item = outsidelib_listview->firstChild(); + TQListViewItem *item = outsidelib_listview->firstChild(); while (item->nextSibling() != outsidelib_listview->currentItem()) item = item->nextSibling(); item->moveItem(outsidelib_listview->currentItem()); @@ -295,33 +295,33 @@ void TargetOptionsDialog::outsideAddClicked() KURLRequesterDlg dialog( "", i18n( "Add Library: Choose the .a/.so file, give -l<libname> or use a variable with $(FOOBAR)" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); dialog.urlRequester() ->setFilter( "*.so|"+i18n("Shared Library (*.so)")+"\n*.a|"+i18n("Static Library (*.a)") ); - dialog.urlRequester() ->setURL( QString::null ); + dialog.urlRequester() ->setURL( TQString::null ); dialog.urlRequester() ->completionObject() ->setDir( m_widget->selectedSubproject()->path ); dialog.urlRequester() ->fileDialog() ->setURL( KURL::fromPathOrURL( m_widget->selectedSubproject()->path ) ); - if ( dialog.exec() != QDialog::Accepted ) + 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("-l") ) - new QListViewItem( outsidelib_listview, file ); + new TQListViewItem( outsidelib_listview, file ); else { - QFileInfo fi(file); + TQFileInfo fi(file); if( !fi.exists() ) - new QListViewItem( outsidelib_listview, file ); + new TQListViewItem( outsidelib_listview, file ); if( fi.extension(false) == "a" ) { - new QListViewItem( outsidelib_listview, file ); + new TQListViewItem( outsidelib_listview, file ); }else if ( fi.extension(false) == "so" ) { - QString name = fi.fileName(); + TQString name = fi.fileName(); if( name.startsWith( "lib" ) ) name = name.mid(3); name = "-l"+name.left( name.length() - 3 ); - new QListViewItem( outsidelib_listview, name ); + new TQListViewItem( outsidelib_listview, name ); } } } @@ -334,7 +334,7 @@ void TargetOptionsDialog::outsideEditClicked() if ( (outsidelib_listview->childCount()==0) || (outsidelib_listview->currentItem() == 0) ) return; bool ok; - QString dir = KInputDialog::getText(i18n("Edit External Library"), i18n("Edit external library:"), + TQString dir = KInputDialog::getText(i18n("Edit External Library"), i18n("Edit external library:"), outsidelib_listview->currentItem()-> text(0), &ok, 0); if (ok && !dir.isEmpty()) outsidelib_listview->currentItem()-> setText(0, dir); @@ -350,7 +350,7 @@ void TargetOptionsDialog::outsideRemoveClicked() void TargetOptionsDialog::accept() { storeConfig(); - QDialog::accept(); + TQDialog::accept(); } #include "targetoptionsdlg.moc" |