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 /core/pim/todo/mainwindow.h | |
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.h | 8 |
1 files changed, 3 insertions, 5 deletions
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 | |||
@@ -46,23 +46,21 @@ class QMenuBar; | |||
46 | class QToolBar; | 46 | class QToolBar; |
47 | class QAction; | 47 | class QAction; |
48 | class Ir; | 48 | class Ir; |
49 | class QVBox; | 49 | class QVBox; |
50 | class QLineEdit; | 50 | class QLineEdit; |
51 | 51 | ||
52 | using namespace Opie; | ||
53 | |||
54 | namespace Todo { | 52 | namespace Todo { |
55 | typedef TodoView View; | 53 | typedef TodoView View; |
56 | class TemplateManager; | 54 | class TemplateManager; |
57 | class Editor; | 55 | class Editor; |
58 | class TodoShow; | 56 | class TodoShow; |
59 | class TemplateEditor; | 57 | class TemplateEditor; |
60 | struct QuickEditBase; | 58 | struct QuickEditBase; |
61 | 59 | ||
62 | class MainWindow : public OPimMainWindow { | 60 | class MainWindow : public Opie::OPimMainWindow { |
63 | Q_OBJECT | 61 | Q_OBJECT |
64 | friend class TodoView; // avoid QObject here.... | 62 | friend class TodoView; // avoid QObject here.... |
65 | friend class TodoShow; // avoid QObject | 63 | friend class TodoShow; // avoid QObject |
66 | public: | 64 | public: |
67 | /* OApplicationFactory application Name */ | 65 | /* OApplicationFactory application Name */ |
68 | static QString appName() { return QString::fromLatin1("todolist"); } | 66 | static QString appName() { return QString::fromLatin1("todolist"); } |
@@ -141,13 +139,13 @@ private slots: | |||
141 | *m_deleteAllAction, | 139 | *m_deleteAllAction, |
142 | *m_deleteCompleteAction, | 140 | *m_deleteCompleteAction, |
143 | *m_duplicateAction, | 141 | *m_duplicateAction, |
144 | *m_showOverDueAction, | 142 | *m_showOverDueAction, |
145 | *m_showQuickTaskAction, | 143 | *m_showQuickTaskAction, |
146 | *m_effectiveAction; | 144 | *m_effectiveAction; |
147 | OWidgetStack *m_stack; | 145 | Opie::OWidgetStack *m_stack; |
148 | QPopupMenu* m_catMenu, | 146 | QPopupMenu* m_catMenu, |
149 | *m_edit, | 147 | *m_edit, |
150 | *m_options, | 148 | *m_options, |
151 | *m_template; | 149 | *m_template; |
152 | 150 | ||
153 | bool m_syncing:1; | 151 | bool m_syncing:1; |
@@ -202,12 +200,12 @@ private slots: | |||
202 | void reload(); | 200 | void reload(); |
203 | int create(); | 201 | int create(); |
204 | bool remove( int uid ); | 202 | bool remove( int uid ); |
205 | void beam(int uid); | 203 | void beam(int uid); |
206 | void show( int uid ); | 204 | void show( int uid ); |
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 ); |
210 | }; | 208 | }; |
211 | } | 209 | } |
212 | 210 | ||
213 | #endif | 211 | #endif |