4 files changed, 14 insertions, 14 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp index 15293fd..e00dcce 100644 --- a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp @@ -1,17 +1,17 @@ #include "interfaceinformationimp.h" #include "interfaceadvanced.h" #include <qpushbutton.h> #include <qlabel.h> #include <qgroupbox.h> #include <qmessagebox.h> -#ifdef QTE_VERSION +#ifdef QWS #else #define showMaximized show #endif /** * Constructor for the InterfaceInformationImp class. This class pretty much * just display's information about the interface that is passed to it. */ diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index d6b708b..581b7e3 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp @@ -9,22 +9,22 @@ #include <qlistbox.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qheader.h>
#include <qlabel.h>
#include <qmessagebox.h>
-#ifdef QTE_VERSION
+#ifdef QWS
#include <qpe/config.h>
#include <qpe/qlibrary.h>
#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
- #define QLibrary
+// #define QLibrary Library
#else
#include <klibloader.h>
#define QLibrary KLibrary
#include <kconfig.h>
#define Config KConfig
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
@@ -54,18 +54,18 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
// Load connections.
// /usr/local/kde/lib/libinterfaces.la
-#ifdef QTE_VERSION
- loadModules(QPEApplication::kdeDir() + "/plugins/networksettings");
+#ifdef QWS
+ loadModules(QPEApplication::qpeDir() + "/plugins/networksettings");
#else
loader = KLibLoader::self();
loadModules(QString("/usr/")+KStandardDirs::kde_default("lib"));
#endif
getAllInterfaces();
Interfaces i;
QStringList list = i.getInterfaceList();
@@ -125,17 +125,17 @@ MainWindowImp::~MainWindowImp(){ // Delete all interfaces that don't have owners.
QMap<Interface*, QListViewItem*>::Iterator iIt;
for( iIt = items.begin(); iIt != items.end(); ++iIt ){
if(iIt.key()->getModuleOwner() == NULL)
delete iIt.key();
}
-#ifdef QTE_VERSION
+#ifdef QWS
// Delete Modules and Libraries
QMap<Module*, QLibrary*>::Iterator it;
for( it = libraries.begin(); it != libraries.end(); ++it ){
delete it.key();
// I wonder why I can't delete the libraries
// What fucking shit this is.
//delete it.data();
}
@@ -241,17 +241,17 @@ void MainWindowImp::loadModules(const QString &path){ * @param pluginFileName - the name of the file in which to attempt to load
* @param resolveString - function pointer to resolve
* @return pointer to the function with name resolveString or NULL
*/
Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString){
#ifdef DEBUG
qDebug("MainWindowImp::loadPlugin: %s", pluginFileName.latin1());
#endif
-#ifdef QTE_VERSION
+#ifdef QWS
QLibrary *lib = new QLibrary(pluginFileName);
void *functionPointer = lib->resolve(resolveString);
if( !functionPointer ){
#ifdef DEBUG
qDebug("MainWindowImp::loadPlugin: File: %s is not a plugin, but though was.", pluginFileName.latin1());
#endif
delete lib;
return NULL;
@@ -377,17 +377,17 @@ void MainWindowImp::configureClicked(){ if(i->getModuleOwner()){
QWidget *moduleConfigure = i->getModuleOwner()->configure(i);
if(moduleConfigure != NULL){
moduleConfigure->showMaximized();
return;
}
}
- InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WShowModal | Qt::WDestructiveClose | Qt::WType_Dialog);
+ InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog);
QString currentProfileText = currentProfileLabel->text();
if(currentProfileText.upper() == "ALL");
currentProfileText = "";
configure->setProfile(currentProfileText);
configure->showMaximized();
}
/**
@@ -413,17 +413,17 @@ void MainWindowImp::informationClicked(){ if(moduleInformation != NULL){
moduleInformation->showMaximized();
#ifdef DEBUG
qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed.");
#endif
return;
}
}
- InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WShowModal | Qt::WDestructiveClose | Qt::WType_Dialog);
+ InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog);
information->showMaximized();
}
/**
* Update this interface. If no QListViewItem exists create one.
* @param Interface* pointer to the interface that needs to be updated.
*/
void MainWindowImp::updateInterface(Interface *i){
@@ -445,17 +445,17 @@ void MainWindowImp::updateInterface(Interface *i){ }
items.insert(i, item);
interfaceItems.insert(item, i);
}
else
item = items[i];
// Update the icons and information
-#ifdef QTE_VERSION
+#ifdef QWS
item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down")));
#else
item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down")));
#endif
QString typeName = "lan";
if(i->getHardwareName().contains("Local Loopback"))
typeName = "lo";
@@ -467,17 +467,17 @@ void MainWindowImp::updateInterface(Interface *i){ typeName = "usb";
if(!i->isAttached())
typeName = "connect_no";
// Actually try to use the Module
if(i->getModuleOwner() != NULL)
typeName = i->getModuleOwner()->getPixmapName(i);
-#ifdef QTE_VERSION
+#ifdef QWS
item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName)));
#else
item->setPixmap(1, (SmallIcon(typeName)));
#endif
item->setText(2, i->getHardwareName());
item->setText(3, QString("(%1)").arg(i->getInterfaceName()));
item->setText(4, (i->getStatus()) ? i->getIp() : QString(""));
}
diff --git a/noncore/settings/networksettings/mainwindowimp.h b/noncore/settings/networksettings/mainwindowimp.h index 2ebf304..49f3eea 100644 --- a/noncore/settings/networksettings/mainwindowimp.h +++ b/noncore/settings/networksettings/mainwindowimp.h @@ -4,17 +4,17 @@ #include "mainwindow.h"
#include <qmap.h>
#include <qstringlist.h>
class Module;
class Interface;
class QLibrary;
class KProcess;
-#ifdef QTE_VERSION
+#ifdef QWS
class QLibrary;
#else
class KLibrary;
class KLibLoader;
#define QLibrary KLibrary
#endif
@@ -53,17 +53,17 @@ private: QMap<Interface*, QListViewItem*> items;
QMap<QListViewItem*, Interface*> interfaceItems;
QMap<KProcess*, QString> threads;
QStringList profiles;
bool advancedUserMode;
QString scheme;
-#ifndef QTE_VERSION
+#ifndef QWS
KLibLoader *loader;
#endif
};
#endif
// mainwindowimp.h
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 57266bb..8bf004f 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -8,17 +8,17 @@ #include <qlineedit.h> #include <qlabel.h> #include <qspinbox.h> #include <qradiobutton.h> #include <qcheckbox.h> #include <qtabwidget.h> #include <qcombobox.h> -#ifdef QTE_VERSION +#ifdef QWS #include <opie/oprocess.h> #else #define OProcess KProcess #include <kprocess.h> #endif #define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" |