summaryrefslogtreecommitdiffstats
path: root/buildtools/autotools/addservicedlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/autotools/addservicedlg.cpp')
-rw-r--r--buildtools/autotools/addservicedlg.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/buildtools/autotools/addservicedlg.cpp b/buildtools/autotools/addservicedlg.cpp
index 2dc76e5e..dde34053 100644
--- a/buildtools/autotools/addservicedlg.cpp
+++ b/buildtools/autotools/addservicedlg.cpp
@@ -11,11 +11,11 @@
#include "addservicedlg.h"
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qlistview.h>
-#include <qtextstream.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqlistview.h>
+#include <tqtextstream.h>
#include <klineedit.h>
#include <kdebug.h>
#include <kicondialog.h>
@@ -32,7 +32,7 @@
AddServiceDialog::AddServiceDialog(AutoProjectWidget *widget, SubprojectItem *spitem,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: AddServiceDialogBase(parent, name, true)
{
filename_edit->setText(".desktop");
@@ -45,10 +45,10 @@ AddServiceDialog::AddServiceDialog(AutoProjectWidget *widget, SubprojectItem *sp
subProject = spitem;
// Fill the combo box with library names in the directory
- QPtrListIterator<TargetItem> tit(spitem->targets);
+ TQPtrListIterator<TargetItem> tit(spitem->targets);
for (; tit.current(); ++tit) {
if ((*tit)->primary == "LTLIBRARIES")
- library_combo->insertItem(QString((*tit)->name));
+ library_combo->insertItem(TQString((*tit)->name));
}
// Fill the list of available service types
@@ -56,7 +56,7 @@ AddServiceDialog::AddServiceDialog(AutoProjectWidget *widget, SubprojectItem *sp
KServiceType::List::Iterator it;
for (it = l.begin(); it != l.end(); ++it)
if (!(*it)->isType(KST_KMimeType))
- new QListViewItem(availtypes_listview, (*it)->name());
+ new TQListViewItem(availtypes_listview, (*it)->name());
setIcon ( SmallIcon ( "servicenew_kdevelop.png" ) );
}
@@ -68,14 +68,14 @@ AddServiceDialog::~AddServiceDialog()
void AddServiceDialog::updateProperties()
{
- QStringList props;
+ TQStringList props;
- QListViewItem *item = static_cast<QCheckListItem*>(chosentypes_listview->firstChild());
+ TQListViewItem *item = static_cast<TQCheckListItem*>(chosentypes_listview->firstChild());
while (item) {
KServiceType::Ptr type = KServiceType::serviceType(item->text(0));
if (type) {
- QStringList stprops = type->propertyDefNames();
- QStringList::ConstIterator stit;
+ TQStringList stprops = type->propertyDefNames();
+ TQStringList::ConstIterator stit;
for (stit = stprops.begin(); stit != stprops.end(); ++stit)
if (props.find(*stit) == props.end() && (*stit) != "Name" && (*stit) != "Comment"
&& (*stit) != "Icon")
@@ -85,16 +85,16 @@ void AddServiceDialog::updateProperties()
}
properties_listview->clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = props.begin(); it != props.end(); ++it)
- new QListViewItem(properties_listview, *it);
+ new TQListViewItem(properties_listview, *it);
}
void AddServiceDialog::iconClicked()
{
KIconLoader *loader = AutoProjectFactory::instance()->iconLoader();
- QString name = KIconDialog::getIcon(KIcon::Desktop);
+ TQString name = KIconDialog::getIcon(KIcon::Desktop);
if (!name.isNull()) {
iconName = name;
icon_button->setPixmap(loader->loadIcon(name, KIcon::Desktop));
@@ -104,17 +104,17 @@ void AddServiceDialog::iconClicked()
void AddServiceDialog::addTypeClicked()
{
- QListViewItem *selitem = availtypes_listview->selectedItem();
+ TQListViewItem *selitem = availtypes_listview->selectedItem();
if (!selitem)
return;
- QListViewItem *olditem = chosentypes_listview->firstChild();
+ TQListViewItem *olditem = chosentypes_listview->firstChild();
while (olditem) {
if (selitem->text(0) == olditem->text(0))
return;
olditem = olditem->nextSibling();
}
- new QListViewItem(chosentypes_listview, selitem->text(0));
+ new TQListViewItem(chosentypes_listview, selitem->text(0));
updateProperties();
}
@@ -128,13 +128,13 @@ void AddServiceDialog::removeTypeClicked()
}
-void AddServiceDialog::propertyExecuted(QListViewItem *item)
+void AddServiceDialog::propertyExecuted(TQListViewItem *item)
{
if (!item)
return;
- QString prop = item->text(0);
- QString value = item->text(1);
+ TQString prop = item->text(0);
+ TQString value = item->text(1);
bool ok;
value = KInputDialog::getText(i18n("Enter Value"), i18n("Property %1:").arg(prop), value, &ok, this);
if (!ok)
@@ -147,29 +147,29 @@ void AddServiceDialog::propertyExecuted(QListViewItem *item)
void AddServiceDialog::accept()
{
// Create list of service types
- QStringList serviceTypes;
- QListViewItem *item = chosentypes_listview->firstChild();
+ TQStringList serviceTypes;
+ TQListViewItem *item = chosentypes_listview->firstChild();
while (item) {
serviceTypes.append(item->text(0));
item = item->nextSibling();
}
// Some plausibility tests
- QString fileName = filename_edit->text();
+ TQString fileName = filename_edit->text();
if (fileName.isEmpty() || fileName == ".desktop") {
KMessageBox::sorry(this, i18n("You have to enter a file name."));
filename_edit->setFocus();
return;
}
- QString name = name_edit->text();
+ TQString name = name_edit->text();
if (name.isEmpty()) {
KMessageBox::sorry(this, i18n("You have to enter a service name."));
name_edit->setFocus();
return;
}
- QFile f(subProject->path + "/" + fileName);
+ TQFile f(subProject->path + "/" + fileName);
if (f.exists()) {
KMessageBox::sorry(this, i18n("A file with this name exists already."));
filename_edit->setFocus();
@@ -180,7 +180,7 @@ void AddServiceDialog::accept()
return;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
stream << "[Desktop Entry]" << endl;
stream << "Type=Service" << endl;
stream << "Name=" << name << endl;
@@ -197,12 +197,12 @@ void AddServiceDialog::accept()
// Find a prefix that points to the services directory.
// If there is none, use kde_services
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for (it = subProject->prefixes.begin(); it != subProject->prefixes.end(); ++it)
if (it.data() == "$(kde_servicesdir)")
break;
- QString prefix = (it == subProject->prefixes.end())? QString("kde_services") : it.key();
- QString varname = prefix + "_DATA";
+ TQString prefix = (it == subProject->prefixes.end())? TQString("kde_services") : it.key();
+ TQString varname = prefix + "_DATA";
// Look if a list view item for this prefix exists already.
// Create a new one otherwise
@@ -223,11 +223,11 @@ void AddServiceDialog::accept()
titem->sources.append(fitem);
subProject->variables[varname] += (" " + fileName);
- QMap<QString, QString> replaceMap;
+ TQMap<TQString, TQString> replaceMap;
replaceMap.insert(varname, subProject->variables[varname]);
AutoProjectTool::addToMakefileam(subProject->path + "/Makefile.am", replaceMap);
- QDialog::accept();
+ TQDialog::accept();
}
#include "addservicedlg.moc"