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

List:       kde-commits
Subject:    extragear/pim/ksig
From:       Pino Toscano <pino () kde ! org>
Date:       2012-09-21 9:53:55
Message-ID: 20120921095355.50617AC7E8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1317153 by pino:

restore the row/column statusbar indicator


 M  +5 -2      ksig.cpp  
 M  +1 -1      ksig.h  


--- trunk/extragear/pim/ksig/ksig.cpp #1317152:1317153
@@ -111,7 +111,7 @@
     updateListLock = false;
     connect(sigEdit, SIGNAL(textChanged()), this, SLOT(updateList()));
     connect(sigList, SIGNAL(selectionChanged()), this, SLOT(updateEdit()));
-    connect(sigEdit, SIGNAL(cursorPositionChanged(int,int)), this, SLOT(updateStatus(int,int)));
+    connect(sigEdit, SIGNAL(cursorPositionChanged()), this, SLOT(updateStatus()));
 }
 
 void KSig::setupSearchLine()
@@ -271,8 +271,11 @@
     updateListLock = false;
 }
 
-void KSig::updateStatus(int line, int column)
+void KSig::updateStatus()
 {
+    const QTextCursor cursor = sigEdit->textCursor();
+    const int line = cursor.blockNumber();
+    const int column = cursor.columnNumber();
     statusBar()->changeItem(i18n(" Line: %1 ", line + 1), LineNumber);
     statusBar()->changeItem(i18n(" Col: %1 ", column + 1), ColumnNumber);
 }
--- trunk/extragear/pim/ksig/ksig.h #1317152:1317153
@@ -59,7 +59,7 @@
 
     void updateList();
     void updateEdit();
-    void updateStatus(int line, int column);
+    void updateStatus();
 
 private:
     QString header;
[prev in list] [next in list] [prev in thread] [next in thread] 

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