Semi-yearly copyright bump
[quassel.git] / src / qtui / settingspages / coreconnectionsettingspage.cpp
index 4113a4e..f29d6ba 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -24,13 +24,10 @@ CoreConnectionSettingsPage::CoreConnectionSettingsPage(QWidget *parent)
     : SettingsPage(tr("Remote Cores"), tr("Connection"), parent)
 {
     ui.setupUi(this);
-#ifndef HAVE_KDE
-    ui.useSolid->hide();
-#endif
 
     initAutoWidgets();
 
-    connect(ui.useSolid, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
+    connect(ui.useQNetworkConfigurationManager, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
     connect(ui.usePingTimeout, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
     connect(ui.useNoTimeout, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
 }
@@ -49,11 +46,7 @@ void CoreConnectionSettingsPage::widgetHasChanged()
 
 void CoreConnectionSettingsPage::defaults()
 {
-#ifdef HAVE_KDE
-    setRadioButtons(CoreConnectionSettings::UseSolid);
-#else
-    setRadioButtons(CoreConnectionSettings::UsePingTimeout);
-#endif
+    setRadioButtons(CoreConnectionSettings::UseQNetworkConfigurationManager);
 
     SettingsPage::defaults();
 }
@@ -80,11 +73,9 @@ void CoreConnectionSettingsPage::save()
 void CoreConnectionSettingsPage::setRadioButtons(CoreConnectionSettings::NetworkDetectionMode mode)
 {
     switch (mode) {
-#ifdef HAVE_KDE
-    case CoreConnectionSettings::UseSolid:
-        ui.useSolid->setChecked(true);
+    case CoreConnectionSettings::UseQNetworkConfigurationManager:
+        ui.useQNetworkConfigurationManager->setChecked(true);
         break;
-#endif
     case CoreConnectionSettings::UsePingTimeout:
         ui.usePingTimeout->setChecked(true);
         break;
@@ -96,10 +87,8 @@ void CoreConnectionSettingsPage::setRadioButtons(CoreConnectionSettings::Network
 
 CoreConnectionSettings::NetworkDetectionMode CoreConnectionSettingsPage::modeFromRadioButtons() const
 {
-#ifdef HAVE_KDE
-    if (ui.useSolid->isChecked())
-        return CoreConnectionSettings::UseSolid;
-#endif
+    if (ui.useQNetworkConfigurationManager->isChecked())
+        return CoreConnectionSettings::UseQNetworkConfigurationManager;
     if (ui.usePingTimeout->isChecked())
         return CoreConnectionSettings::UsePingTimeout;