From a71a4cc60303b29f493d9d0b6636f00473c4eaf6 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 29 Jan 2008 16:13:53 +0000 Subject: [PATCH 1/1] OK, disabled warnings for the moment :) Distclean advised. --- src/client/client.cpp | 4 ++-- src/qtui/mainwin.cpp | 6 +++--- src/qtui/settingspages/networkssettingspage.cpp | 5 ++++- src/qtui/settingspages/networkssettingspage.h | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index ecfc1092..3c27145b 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -105,13 +105,13 @@ void Client::init() { p->attachSignal(this, SIGNAL(requestRemoveIdentity(IdentityId)), SIGNAL(removeIdentity(IdentityId))); p->attachSlot(SIGNAL(identityCreated(const Identity &)), this, SLOT(coreIdentityCreated(const Identity &))); p->attachSlot(SIGNAL(identityRemoved(IdentityId)), this, SLOT(coreIdentityRemoved(IdentityId))); - +/* p->attachSignal(this, SIGNAL(requestCreateNetwork(const NetworkInfo &)), SIGNAL(createNetwork(const NetworkInfo &))); p->attachSignal(this, SIGNAL(requestUpdateNetwork(const NetworkInfo &)), SIGNAL(updateNetwork(const NetworkInfo &))); p->attachSignal(this, SIGNAL(requestRemoveNetwork(NetworkId)), SIGNAL(removeNetwork(NetworkId))); p->attachSlot(SIGNAL(networkCreated(const NetworkInfo &)), this, SLOT(coreNetworkCreated(const NetworkInfo &))); p->attachSlot(SIGNAL(networkRemoved(NetworkId)), this, SLOT(coreNetworkRemoved(NetworkId))); - +*/ connect(p, SIGNAL(disconnected()), this, SLOT(disconnectFromCore())); //connect(mainUi, SIGNAL(connectToCore(const QVariantMap &)), this, SLOT(connectToCore(const QVariantMap &))); diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 309d9c7b..a45bfc1d 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -232,13 +232,13 @@ QDockWidget *MainWin::addBufferView(const QString &viewname, QAbstractItemModel } void MainWin::setupSettingsDlg() { -#ifdef SPUTDEV - connect(settingsDlg, SIGNAL(finished(int)), QApplication::instance(), SLOT(quit())); // FIXME -#endif settingsDlg->registerSettingsPage(new FontsSettingsPage(settingsDlg)); settingsDlg->registerSettingsPage(new IdentitiesSettingsPage(settingsDlg)); +#ifdef SPUTDEV settingsDlg->registerSettingsPage(new NetworksSettingsPage(settingsDlg)); + connect(settingsDlg, SIGNAL(finished(int)), QApplication::instance(), SLOT(quit())); // FIXME +#endif } void MainWin::connectedToCore() { diff --git a/src/qtui/settingspages/networkssettingspage.cpp b/src/qtui/settingspages/networkssettingspage.cpp index fd2d7e85..1344be48 100644 --- a/src/qtui/settingspages/networkssettingspage.cpp +++ b/src/qtui/settingspages/networkssettingspage.cpp @@ -39,7 +39,7 @@ NetworksSettingsPage::NetworksSettingsPage(QWidget *parent) : SettingsPage(tr("G setEnabled(false); // need a core connection! setWidgetStates(); connect(Client::instance(), SIGNAL(coreConnectionStateChanged(bool)), this, SLOT(coreConnectionStateChanged(bool))); - connect(Client::instance(), SIGNAL(networkAdded(NetworkId)), this, SLOT(clientNetworkAdded(NetworkId))); + connect(Client::instance(), SIGNAL(networkCreated(NetworkId)), this, SLOT(clientNetworkAdded(NetworkId))); connect(Client::instance(), SIGNAL(networkRemoved(NetworkId)), this, SLOT(clientNetworkRemoved(NetworkId))); connect(Client::instance(), SIGNAL(identityCreated(IdentityId)), this, SLOT(clientIdentityAdded(IdentityId))); connect(Client::instance(), SIGNAL(identityRemoved(IdentityId)), this, SLOT(clientIdentityRemoved(IdentityId))); @@ -252,6 +252,9 @@ void NetworksSettingsPage::clientNetworkUpdated() { } } +void NetworksSettingsPage::clientNetworkRemoved(NetworkId) { + +} QListWidgetItem *NetworksSettingsPage::insertNetwork(NetworkId id) { NetworkInfo info = Client::network(id)->networkInfo(); diff --git a/src/qtui/settingspages/networkssettingspage.h b/src/qtui/settingspages/networkssettingspage.h index b0b4ef59..89ac4b21 100644 --- a/src/qtui/settingspages/networkssettingspage.h +++ b/src/qtui/settingspages/networkssettingspage.h @@ -52,6 +52,7 @@ class NetworksSettingsPage : public SettingsPage { void displayNetwork(NetworkId, bool dontsave = false); void clientNetworkAdded(NetworkId); + void clientNetworkRemoved(NetworkId); void clientNetworkUpdated(); void clientIdentityAdded(IdentityId); -- 2.20.1