Add a property disableDecoration to BufferViewConfig
[quassel.git] / src / qtui / settingspages / chatmonitorsettingspage.cpp
index e3d4b56..cbfa26e 100644 (file)
@@ -41,7 +41,8 @@ ChatMonitorSettingsPage::ChatMonitorSettingsPage(QWidget *parent)
   // setup available buffers config (for the bufferview on the left)
   _configAvailable = new BufferViewConfig(-667, this);
   _configAvailable->setBufferViewName("tmpChatMonitorAvailableBuffers");
-  _configAvailable->sortAlphabetically();
+  _configAvailable->setSortAlphabetically(true);
+  _configAvailable->setDisableDecoration(true);
   _configAvailable->setNetworkId(NetworkId());
   _configAvailable->setInitialized();
 
@@ -49,6 +50,7 @@ ChatMonitorSettingsPage::ChatMonitorSettingsPage(QWidget *parent)
   _configActive = new BufferViewConfig(-666, this);
   _configActive->setBufferViewName("tmpChatMonitorActiveBuffers");
   _configActive->setSortAlphabetically(true);
+  _configActive->setDisableDecoration(true);
   _configActive->setNetworkId(NetworkId());
   _configActive->setInitialized();
 
@@ -92,10 +94,12 @@ void ChatMonitorSettingsPage::load() {
       bufferIdsFromConfig << v.value<BufferId>();
       allBufferIds.removeAll(v.value<BufferId>());
     }
+    qSort(bufferIdsFromConfig.begin(), bufferIdsFromConfig.end(), bufferIdLessThan);
     _configActive->initSetBufferList(bufferIdsFromConfig);
   }
   ui.activeBuffers->setFilteredModel(Client::bufferModel(), _configActive);
 
+  qSort(allBufferIds.begin(), allBufferIds.end(), bufferIdLessThan);
   _configAvailable->initSetBufferList(allBufferIds);
   ui.availableBuffers->setFilteredModel(Client::bufferModel(), _configAvailable);