Diffstat (limited to 'noncore/net/opieirc/ircserverlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircserverlist.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/noncore/net/opieirc/ircserverlist.cpp b/noncore/net/opieirc/ircserverlist.cpp index e664ba1..3293591 100644 --- a/noncore/net/opieirc/ircserverlist.cpp +++ b/noncore/net/opieirc/ircserverlist.cpp | |||
@@ -1,20 +1,18 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <qlayout.h> | 1 | #include <qlayout.h> |
3 | #include <qlabel.h> | 2 | #include <qlabel.h> |
4 | #include <qhbox.h> | 3 | #include <qhbox.h> |
5 | #include <qpushbutton.h> | 4 | #include <qpushbutton.h> |
6 | #include "ircserverlist.h" | 5 | #include "ircserverlist.h" |
7 | #include "ircservereditor.h" | 6 | #include "ircservereditor.h" |
8 | #include <stdio.h> | ||
9 | 7 | ||
10 | class IRCListBoxServer : public QListBoxText { | 8 | class IRCListBoxServer : public QListBoxText { |
11 | public: | 9 | public: |
12 | IRCListBoxServer(IRCServer server) : QListBoxText(server.name()) { | 10 | IRCListBoxServer(IRCServer server) : QListBoxText(server.name()) { |
13 | m_server = server; | 11 | m_server = server; |
14 | } | 12 | } |
15 | 13 | ||
16 | IRCServer server() { | 14 | IRCServer server() { |
17 | return m_server; | 15 | return m_server; |
18 | } | 16 | } |
19 | 17 | ||
20 | void setServer(IRCServer server) { | 18 | void setServer(IRCServer server) { |
@@ -93,25 +91,24 @@ void IRCServerList::editServer() { | |||
93 | IRCServerEditor editor(server, this, "ServerEditor", TRUE); | 91 | IRCServerEditor editor(server, this, "ServerEditor", TRUE); |
94 | if (editor.exec() == QDialog::Accepted) { | 92 | if (editor.exec() == QDialog::Accepted) { |
95 | server = editor.getServer(); | 93 | server = editor.getServer(); |
96 | item->setServer(server); | 94 | item->setServer(server); |
97 | } | 95 | } |
98 | } | 96 | } |
99 | } | 97 | } |
100 | 98 | ||
101 | int IRCServerList::exec() { | 99 | int IRCServerList::exec() { |
102 | int returncode = QDialog::exec(); | 100 | int returncode = QDialog::exec(); |
103 | /* Now save the changes */ | 101 | /* Now save the changes */ |
104 | m_config->setGroup("OpieIRC"); | 102 | m_config->setGroup("OpieIRC"); |
105 | m_config->clearGroup(); | ||
106 | m_config->writeEntry("ServerCount", QString::number(m_list->count())); | 103 | m_config->writeEntry("ServerCount", QString::number(m_list->count())); |
107 | for (unsigned int i=0; i<m_list->count(); i++) { | 104 | for (unsigned int i=0; i<m_list->count(); i++) { |
108 | IRCServer server = ((IRCListBoxServer *)m_list->item(i))->server(); | 105 | IRCServer server = ((IRCListBoxServer *)m_list->item(i))->server(); |
109 | m_config->setGroup("OpieIRC"); | 106 | m_config->setGroup("OpieIRC"); |
110 | m_config->writeEntry("Server"+QString::number(i), server.name()); | 107 | m_config->writeEntry("Server"+QString::number(i), server.name()); |
111 | m_config->setGroup(server.name()); | 108 | m_config->setGroup(server.name()); |
112 | m_config->writeEntry("Hostname", server.hostname()); | 109 | m_config->writeEntry("Hostname", server.hostname()); |
113 | m_config->writeEntry("Port", QString::number(server.port())); | 110 | m_config->writeEntry("Port", QString::number(server.port())); |
114 | m_config->writeEntry("Username", server.username()); | 111 | m_config->writeEntry("Username", server.username()); |
115 | m_config->writeEntry("Password", server.password()); | 112 | m_config->writeEntry("Password", server.password()); |
116 | m_config->writeEntry("Nick", server.nick()); | 113 | m_config->writeEntry("Nick", server.nick()); |
117 | m_config->writeEntry("Realname", server.realname()); | 114 | m_config->writeEntry("Realname", server.realname()); |