Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. QStringList IrcAccountConfigurationDialog::RemoveDuplicatesChannels (const QString& network,
  2. const QString& server, const QStringList& channels)
  3. {
  4. QStringList strList = channels;
  5. qDebug () << strList;
  6. Q_FOREACH (const QVariant& serverInfo, ServersInfo_)
  7. {
  8. if (serverInfo.toMap () ["Network"].toString () == network &&
  9. serverInfo.toMap () ["Server"].toString () == server)
  10.  
  11. {
  12. Q_FOREACH (const QString& str, serverInfo.toMap () ["Channels"].toStringList ())
  13. {
  14. qDebug () << str;
  15. for (int i = 0; i < channels.count (); ++i)
  16. {
  17. qDebug () << str.split (' ', QString::SkipEmptyParts).at (0) << channels.at (i).split (' ', QString::SkipEmptyParts).at (0);
  18. if (str.split (' ', QString::SkipEmptyParts).at (0) ==
  19. channels.at (i).split (' ', QString::SkipEmptyParts).at (0))
  20. strList.removeAt (i);
  21. }
  22. }
  23. }
  24. }
  25. qDebug () << strList;
  26. return strList;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement