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

List:       kde-pim
Subject:    Re: [Kde-pim] [PATCH] Fix header colorization action of knode's
From:       Volker Krause <volker.krause () rwth-aachen ! de>
Date:       2003-12-31 11:12:46
Message-ID: 200312311212.46624.volker.krause () rwth-aachen ! de
[Download RAW message or body]

On Wednesday 31 December 2003 00:46, Ingo Klöcker wrote:
> Hmm, it would be better if you added a const to the method in the parent
> class. After all this method should be const because it doesn't change
> anything. And remember, BC is no issue. So changing the interface of
> KScoring is no problem.

Makes sense, new patch attached.

> It's always better to let Qt find a suitable id for a widget. This id is
> returned by QWidgetStack::addWidget(...) and it should be stored if
> it's needed later. Explicitely specifying an id will just lead to
> problems (the id has to be unique because else Qt will simply use
> another id -> same problem as now) and should be avoided at all cost.

Thats exactly what I'm trying to avoid, the problem seems the mixed usage of 
automatic and manual chosen id's. With the patch all id's are chosen manually 
and are therefore unique. If Qt would automatically chose numbers from 0 to 
n, that would be ok, but that was obviously not the case here. Then I would 
need to add some kind of 0..n to id mapping which seems quite unnecessary if 
I could chose useful id's myself.

regards
Volker

["kscoring_colorize.diff" (text/x-diff)]

? Doxyfile
? kscoring_2nd_try.diff
? kscoring_appname.diff
? kscoring_appname_bic.diff
? kscoringeditor_widgetstackorder.diff
? libkdenetwork.kdevelop
? libkdenetwork.kdevelop.pcs
? libkdenetwork.kdevses
Index: kscoring.h
===================================================================
RCS file: /home/kde/kdepim/libkdenetwork/kscoring.h,v
retrieving revision 1.23
diff -u -r1.23 kscoring.h
--- kscoring.h	24 Dec 2003 11:48:32 -0000	1.23
+++ kscoring.h	31 Dec 2003 11:11:31 -0000
@@ -350,9 +350,9 @@
   void save();
 
   //--------------- Properties
-  virtual bool canScores() { return true; }
-  virtual bool canNotes() { return true; }
-  virtual bool canColors() { return false; }
+  virtual bool canScores() const { return true; }
+  virtual bool canNotes() const { return true; }
+  virtual bool canColors() const { return false; }
   virtual bool hasFeature(int);
 
  signals:
Index: kscoringeditor.cpp
===================================================================
RCS file: /home/kde/kdepim/libkdenetwork/kscoringeditor.cpp,v
retrieving revision 1.37
diff -u -r1.37 kscoringeditor.cpp
--- kscoringeditor.cpp	21 Jul 2003 15:45:48 -0000	1.37
+++ kscoringeditor.cpp	31 Dec 2003 11:11:33 -0000
@@ -187,7 +187,7 @@
   topL->addWidget(stack);
   
   dummyLabel = new QLabel(i18n("Select an action:"), stack);
-  stack->addWidget(dummyLabel);
+  stack->addWidget(dummyLabel, 0);
 
   // init widget stack and the types combo box
   int index = 1;


_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/

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

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