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

List:       kde-commits
Subject:    branches/work/kde4/kdenetwork/ksirc
From:       Maks Orlovich <maksim () kde ! org>
Date:       2005-05-31 20:48:42
Message-ID: 1117572522.950025.5308.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 420346 by orlovich:

Make it run. Doesn't work too well, but it does go online. Not sure about the parser changes, either.



 M  +2 -1      chanparser.cpp  
 M  +7 -5      displayMgrMDI.cpp  
 M  +1 -1      ksparser.cpp  
 M  +8 -5      mditoplevel.cpp  


--- branches/work/kde4/kdenetwork/ksirc/chanparser.cpp #420345:420346
@@ -280,7 +280,8 @@
     // Flush the screen.
     // First remove the prompt message from the Buffer.
     // (it's garunteed to be the first one)
-    top->LineBuffer.remove( *top->LineBuffer.begin() );
+    if (!top->LineBuffer.isEmpty())
+       top->LineBuffer.pop_front();
     top->Buffer = FALSE;
     top->sirc_receive(QString(""));
 
--- branches/work/kde4/kdenetwork/ksirc/displayMgrMDI.cpp #420345:420346
@@ -214,12 +214,13 @@
         KMainWindow *kst = static_cast<KMainWindow *>(s);
         kdDebug(5008) << "Top is: " << kst->name("none give") <<endl;
 
-        QMenuData *tmenu = kst->menuBar();
+        QMenuBar *tmenu = kst->menuBar();
         if(tmenu){
-            QMenuItem *menui = tmenu->findItem(DMM_MDI_ID);
+            int idx = tmenu->indexOf(DMM_MDI_ID);
+            QAction *menui = idx == -1 ? 0 : tmenu->actions().at(idx);
             if(menui){
-                QMenuData *cmenu = menui->popup();
-                if(cmenu->findItem(DMM_DEATCH_ID) && cmenu->isItemChecked(DMM_DEATCH_ID)){
+                QMenu *cmenu = menui->menu();
+                if(cmenu->indexOf(DMM_DEATCH_ID) != -1 && cmenu->isItemChecked(DMM_DEATCH_ID)) {
                     kst->reparent( topLevel()->tabWidget(), 0, QPoint( 0, 0 ), true );
                     show(kst);
                     cmenu->setItemChecked(DMM_DEATCH_ID, false);
@@ -227,7 +228,8 @@
                 else {
                     hide(kst);
                     kst->reparent( 0, QPoint(0,0), true );
-                    cmenu->setItemChecked(DMM_DEATCH_ID, true);
+                    if (cmenu->indexOf(DMM_DEATCH_ID) != -1)
+                        cmenu->setItemChecked(DMM_DEATCH_ID, true);
                 }
             }
         }
--- branches/work/kde4/kdenetwork/ksirc/ksparser.cpp #420345:420346
@@ -37,7 +37,7 @@
     for (unsigned int i = 0; i < message.length();)
     {
         QChar ch = message[i++];
-        if (ch.latin1() == 0x03 || ch == '~' && i < message.length())
+        if ((ch.latin1() == 0x03 || ch == '~') && i < message.length())
         {
             QChar next = message[ i++ ];
             if (next.latin1() >= 0x30 && next.latin1() <= 0x39)
--- branches/work/kde4/kdenetwork/ksirc/mditoplevel.cpp #420345:420346
@@ -23,12 +23,15 @@
 
 void KSTabWidget::mousePressEvent(QMouseEvent *e)
 {
-    if(e->button() == RightButton){
+    if(e->button() == Qt::RightButton){
         QPoint p = tabBar()->mapFromParent(e->pos());
-	QTab *tab = tabBar()->selectTab(p);
-	if(tab){
-	    int id = tab->identifier();
-            emit showContexMenu(page(id), tabBar()->mapToGlobal(p));
+	int tab; 
+	for (tab = 0; tab < tabBar()->count(); ++tab)
+		if (tabBar()->tabRect(tab).contains(p))
+			break;
+
+	if(tab != tabBar()->count()){
+            emit showContexMenu(widget(tab), tabBar()->mapToGlobal(p));
 	}
     }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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