kdevelop/src

Andras Mantia amantia at kde.org
Wed Jun 9 15:38:07 UTC 2004


CVS commit by amantia: 

There is some strange thing going on [1], as if I leave the KDevelop's statusbar as StatusBar I get the following error:
/data/development/sources/kde-head/kdevelop/src/newmainwindow.cpp:323: error: syntax
   error before `(' token

I verified and the "statusbar.h" header file is included and the double inclusion guards do not prevent the
definition of the StatusBar class.

The only solution was to rename StatusBar to KDevStatusBar.

[1] This happens on CVS HEAD, so I assume the introduction of setupGUI() and the StatusBar enum. I'm wondering if this can cause
crashes when running a KDevelop compiled for KDE 3.2.x under KDE 3.x or not. It's clear that KDevelop 3.0.x won't be compilable under KDE 3.3.


CCMAIL: kdevelop-devel at kdevelop.org


  M +1 -1      Makefile.am   1.55
  M +2 -2      newmainwindow.cpp   1.22
  M +7 -7      statusbar.cpp   1.17
  M +3 -3      statusbar.h   1.10


--- kdevelop/src/Makefile.am  #1.54:1.55
@@ -11,5 +11,5 @@
 kdevelop_METASOURCES = AUTO
 kdevelop_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kdevelop_LDADD = $(top_builddir)/lib/widgets/libwidgets.la $(top_builddir)/lib/libkdevelop.la $(LIB_KDEVMDI) $(LIB_KDEUI) $(LIB_KPARTS) $(LIB_KHTML) -lktexteditor
+kdevelop_LDADD =  $(top_builddir)/lib/widgets/libwidgets.la $(top_builddir)/lib/libkdevelop.la $(LIB_KDEVMDI) $(LIB_KDEUI) $(LIB_KPARTS) $(LIB_KHTML) -lktexteditor
 
 rcdir = $(kde_datadir)/kdevelop

--- kdevelop/src/newmainwindow.cpp  #1.21:1.22
@@ -319,7 +320,6 @@ KMainWindow *NewMainWindow::main() {
 }
 
-
 void NewMainWindow::createStatusBar() {
-    (void) new StatusBar(this);
+    (void) new KDevStatusBar(this);
 //    QMainWindow::statusBar();
 }

--- kdevelop/src/statusbar.cpp  #1.16:1.17
@@ -32,5 +32,5 @@
 #include "partcontroller.h"
 
-StatusBar::StatusBar(QWidget *parent, const char *name)
+KDevStatusBar::KDevStatusBar(QWidget *parent, const char *name)
     : KStatusBar(parent, name), _cursorIface(0), _activePart(0)
 {
@@ -49,8 +49,8 @@ StatusBar::StatusBar(QWidget *parent, co
 
 
-StatusBar::~StatusBar()
+KDevStatusBar::~KDevStatusBar()
 {}
 
-void StatusBar::activePartChanged(KParts::Part *part)
+void KDevStatusBar::activePartChanged(KParts::Part *part)
 {
         if ( _activePart && _activePart->widget() )
@@ -85,5 +85,5 @@ void StatusBar::activePartChanged(KParts
 }
 
-void StatusBar::cursorPositionChanged()
+void KDevStatusBar::cursorPositionChanged()
 {
   if (_cursorIface)
@@ -95,5 +95,5 @@ void StatusBar::cursorPositionChanged()
 }
 
-void StatusBar::setStatus(const QString &str)
+void KDevStatusBar::setStatus(const QString &str)
 {
         _status->setText(str);
@@ -101,10 +101,10 @@ void StatusBar::setStatus(const QString 
 
 
-void StatusBar::setCursorPosition(int line, int col)
+void KDevStatusBar::setCursorPosition(int line, int col)
 {
         _status->setText(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col));
 }
 
-void StatusBar::addWidget ( QWidget *widget, int stretch, bool permanent)
+void KDevStatusBar::addWidget ( QWidget *widget, int stretch, bool permanent)
 {
         KStatusBar::addWidget(widget,stretch,permanent);

--- kdevelop/src/statusbar.h  #1.9:1.10
@@ -22,11 +22,11 @@ namespace KTextEditor { class ViewCursor
 namespace KParts { class Part; }
 
-class StatusBar : public KStatusBar
+class KDevStatusBar : public KStatusBar
 {
     Q_OBJECT
 
 public:
-    StatusBar( QWidget *parent=0, const char *name=0 );
-    ~StatusBar();
+    KDevStatusBar( QWidget *parent=0, const char *name=0 );
+    ~KDevStatusBar();
     void addWidget ( QWidget *widget, int stretch = 0, bool permanent = FALSE );
 






More information about the KDevelop-devel mailing list