Commit beee0ff2 authored by Peter Simonsson's avatar Peter Simonsson
Browse files

Fix width calculation for server group keys

The width calculation for server group keys in saveOptions was
incorrectly implemented. Let's clean it up and make it work again.
parent 1ccecb3f
......@@ -818,10 +818,9 @@ void Application::saveOptions(bool updateGUI)
int index2 = 0;
int index3 = 0;
int width = 0;
QList<int> keys = serverGroupHash.keys();
for(int i=0; i<keys.count(); i++)
if(width < width =;
width = QString(width).length(); // TODO: broken, always yield 1
for(auto it = serverGroupHash.cbegin(), end = serverGroupHash.cend(); it != end; ++it)
if(width < it.key()) width = it.key();
width = QString::number(width).length();
QStringList servers;
QStringList channels;
QStringList channelHistory;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment