summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-09 18:10:11 (UTC)
committer kergoth <kergoth>2003-04-09 18:10:11 (UTC)
commitbacff63f1e4915c683a409e81b18ffcf5aeceda3 (patch) (side-by-side diff)
treea1b898223bd132a29964ec28a89c0756fa9828cf
parentdc219288ae070e0fe91e2d7da768d620f8b91592 (diff)
downloadopie-bacff63f1e4915c683a409e81b18ffcf5aeceda3.zip
opie-bacff63f1e4915c683a409e81b18ffcf5aeceda3.tar.gz
opie-bacff63f1e4915c683a409e81b18ffcf5aeceda3.tar.bz2
Make networksettings actually compile again. Fix the ifdef on non-kde to actually work, and killed off more references to qt3 widget flags.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp2
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp20
-rw-r--r--noncore/settings/networksettings/mainwindowimp.h4
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp2
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
@@ -3,13 +3,13 @@
#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
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
@@ -11,18 +11,18 @@
#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>
@@ -56,14 +56,14 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
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();
@@ -127,13 +127,13 @@ MainWindowImp::~MainWindowImp(){
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.
@@ -243,13 +243,13 @@ void MainWindowImp::loadModules(const QString &path){
* @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
@@ -379,13 +379,13 @@ void MainWindowImp::configureClicked(){
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();
}
@@ -415,13 +415,13 @@ void MainWindowImp::informationClicked(){
#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.
@@ -447,13 +447,13 @@ void MainWindowImp::updateInterface(Interface *i){
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";
@@ -469,13 +469,13 @@ void MainWindowImp::updateInterface(Interface *i){
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()));
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
@@ -6,13 +6,13 @@
#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
@@ -55,13 +55,13 @@ private:
QMap<KProcess*, QString> threads;
QStringList profiles;
bool advancedUserMode;
QString scheme;
-#ifndef QTE_VERSION
+#ifndef QWS
KLibLoader *loader;
#endif
};
#endif
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
@@ -10,13 +10,13 @@
#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