Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QStringList IrcAccountConfigurationDialog::RemoveDuplicatesChannels (const QString& network,
- const QString& server, const QStringList& channels)
- {
- QStringList strList = channels;
- qDebug () << strList;
- Q_FOREACH (const QVariant& serverInfo, ServersInfo_)
- {
- if (serverInfo.toMap () ["Network"].toString () == network &&
- serverInfo.toMap () ["Server"].toString () == server)
- {
- Q_FOREACH (const QString& str, serverInfo.toMap () ["Channels"].toStringList ())
- {
- qDebug () << str;
- for (int i = 0; i < channels.count (); ++i)
- {
- qDebug () << str.split (' ', QString::SkipEmptyParts).at (0) << channels.at (i).split (' ', QString::SkipEmptyParts).at (0);
- if (str.split (' ', QString::SkipEmptyParts).at (0) ==
- channels.at (i).split (' ', QString::SkipEmptyParts).at (0))
- strList.removeAt (i);
- }
- }
- }
- }
- qDebug () << strList;
- return strList;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement