author | alwin <alwin> | 2004-03-02 14:00:39 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 14:00:39 (UTC) |
commit | 12dd57c04b42d4517061ed847b1aa041dd8af841 (patch) (unidiff) | |
tree | afbd18d5b439138256d27aecec7ef993d74a0bd7 | |
parent | ac3e7c0a1ccbb984f06917ebe6156b1681b7de7f (diff) | |
download | opie-12dd57c04b42d4517061ed847b1aa041dd8af841.zip opie-12dd57c04b42d4517061ed847b1aa041dd8af841.tar.gz opie-12dd57c04b42d4517061ed847b1aa041dd8af841.tar.bz2 |
fixed up todlist to work again. The segfault resulted due a real ugly code-style:
Never, realy never, use "using namespace <...>" inside a include file.
Ever use "Opie::<class>" or such inside include files. Think twice, before using
a "use namespace <...>" inside a c++ file. If you're using it just 3,4 times,
write "Opie::<class>::<variable>" or such. If you just simple write a using
namespace all the time it makes the idea of namespaces obsolete. Mostly: just
integrate your OWN namespace (in that case use namespace Todo;) - but try
to use all other namespaces the explicit way - so you will sure that the compiler
inherits the right methods.
ToDo: write this statement into the developer wiki
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/mainwindow.h | 8 | ||||
-rw-r--r-- | core/pim/todo/quickeditimpl.cpp | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index a244e58..c2f422d 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -66,3 +66,3 @@ MainWindow::MainWindow( QWidget* parent, | |||
66 | const char* name, WFlags ) | 66 | const char* name, WFlags ) |
67 | : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) | 67 | : Opie::OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) |
68 | { | 68 | { |
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index 6a7296b..b35a42b 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -51,4 +51,2 @@ class QLineEdit; | |||
51 | 51 | ||
52 | using namespace Opie; | ||
53 | |||
54 | namespace Todo { | 52 | namespace Todo { |
@@ -61,3 +59,3 @@ namespace Todo { | |||
61 | 59 | ||
62 | class MainWindow : public OPimMainWindow { | 60 | class MainWindow : public Opie::OPimMainWindow { |
63 | Q_OBJECT | 61 | Q_OBJECT |
@@ -146,3 +144,3 @@ private slots: | |||
146 | *m_effectiveAction; | 144 | *m_effectiveAction; |
147 | OWidgetStack *m_stack; | 145 | Opie::OWidgetStack *m_stack; |
148 | QPopupMenu* m_catMenu, | 146 | QPopupMenu* m_catMenu, |
@@ -207,3 +205,3 @@ private slots: | |||
207 | void edit( int uid ); | 205 | void edit( int uid ); |
208 | void add( const OPimRecord& ); | 206 | void add( const Opie::OPimRecord& ); |
209 | void doAlarm( const QDateTime& dt, int uid ); | 207 | void doAlarm( const QDateTime& dt, int uid ); |
diff --git a/core/pim/todo/quickeditimpl.cpp b/core/pim/todo/quickeditimpl.cpp index cd0684f..94ae97e 100644 --- a/core/pim/todo/quickeditimpl.cpp +++ b/core/pim/todo/quickeditimpl.cpp | |||
@@ -23,3 +23,3 @@ QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) | |||
23 | 23 | ||
24 | m_lbl = new OClickableLabel( this ); | 24 | m_lbl = new Opie::OClickableLabel( this ); |
25 | m_lbl->setMinimumWidth( 15 ); | 25 | m_lbl->setMinimumWidth( 15 ); |