[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/network/aki/aki
From:       Keith Allan Rusler <xzekecomax () gmail ! com>
Date:       2009-06-14 6:18:23
Message-ID: 1244960303.361604.14070.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 981684 by karusler:

Removed some old commented code, and fixed bug where when you had a item selected, \
and someone on another client changed someone's irc status, it would change the item \
selected

 M  +7 -11     channeltab.cpp  


--- trunk/playground/network/aki/aki/channeltab.cpp #981683:981684
@@ -164,7 +164,7 @@
 
     if (name != d->socket->name()) {
         d->whoTimer = new QTimer(this);
-        d->whoTimer->setInterval(60000);
+        d->whoTimer->setInterval(120000);
         d->whoTimer->start();
         connect(d->whoTimer, SIGNAL(timeout()), this, SLOT(slotPerformWho()));
 
@@ -406,14 +406,10 @@
     QModelIndex index;
     Aki::Irc::User *user = 0;
 
-    //Aki::Irc::User *user = d->userList->model()->data(d->userList->currentIndex(), \
                NickListModel::IrcUserRole)
-    //                            .value<Aki::Irc::User*>();
-
     for (int i = 0; i < d->userList->count(); ++i) {
         index = d->userList->model()->index(i, 0);
         user = d->userList->model()->data(index, \
NickListModel::IrcUserRole).value<Aki::Irc::User*>();  if (user->nick() == nick) {
-            kDebug() << "found";
             break;
         }
     }
@@ -436,13 +432,13 @@
         } else if (c == QChar('o')) {
             if (state == Give) {
                 user->setModes(modes + c);
-                d->userList->model()->setData(d->userList->currentIndex(),
+                d->userList->model()->setData(index,
                                               \
                QVariant::fromValue<Aki::Irc::User*>(user),
                                               NickListModel::IrcUserRole);
                 d->channelOutput->addMode(from, nick, c, toYou, fromYou);
             } else if (state == Take) {
                 user->removeModes(c);
-                d->userList->model()->setData(d->userList->currentIndex(),
+                d->userList->model()->setData(index,
                                               \
                QVariant::fromValue<Aki::Irc::User*>(user),
                                               NickListModel::IrcUserRole);
                 d->channelOutput->addRemoveMode(from, nick, c, toYou, fromYou);
@@ -450,13 +446,13 @@
         } else if (c == QChar('v')) {
             if (state == Give) {
                 user->setModes(modes + c);
-                d->userList->model()->setData(d->userList->currentIndex(),
+                d->userList->model()->setData(index,
                                               \
                QVariant::fromValue<Aki::Irc::User*>(user),
                                               NickListModel::IrcUserRole);
                 d->channelOutput->addMode(from, nick, c, toYou, fromYou);
             } else if (state == Take) {
                 user->removeModes(c);
-                d->userList->model()->setData(d->userList->currentIndex(),
+                d->userList->model()->setData(index,
                                               \
                QVariant::fromValue<Aki::Irc::User*>(user),
                                               NickListModel::IrcUserRole);
                 d->channelOutput->addRemoveMode(from, nick, c, toYou, fromYou);
@@ -464,13 +460,13 @@
         } else if (c == QChar('h')) {
             if (state == Give) {
                 user->setModes(modes + c);
-                d->userList->model()->setData(d->userList->currentIndex(),
+                d->userList->model()->setData(index,
                                               \
                QVariant::fromValue<Aki::Irc::User*>(user),
                                               NickListModel::IrcUserRole);
                 d->channelOutput->addMode(from, nick, c, toYou, fromYou);
             } else if (state == Take) {
                 user->removeModes(c);
-                d->userList->model()->setData(d->userList->currentIndex(),
+                d->userList->model()->setData(index,
                                               \
                QVariant::fromValue<Aki::Irc::User*>(user),
                                               NickListModel::IrcUserRole);
                 d->channelOutput->addRemoveMode(from, nick, c, toYou, fromYou);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic