From 12dd57c04b42d4517061ed847b1aa041dd8af841 Mon Sep 17 00:00:00 2001 From: alwin Date: Tue, 02 Mar 2004 14:00:39 +0000 Subject: 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::" 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::::" 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 --- 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 @@ -64,7 +64,7 @@ using namespace Todo; MainWindow::MainWindow( QWidget* parent, const char* name, WFlags ) - : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) + : Opie::OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) { if (!name) setName("todo window"); 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 @@ -49,8 +49,6 @@ class Ir; class QVBox; class QLineEdit; -using namespace Opie; - namespace Todo { typedef TodoView View; class TemplateManager; @@ -59,7 +57,7 @@ namespace Todo { class TemplateEditor; struct QuickEditBase; - class MainWindow : public OPimMainWindow { + class MainWindow : public Opie::OPimMainWindow { Q_OBJECT friend class TodoView; // avoid QObject here.... friend class TodoShow; // avoid QObject @@ -144,7 +142,7 @@ private slots: *m_showOverDueAction, *m_showQuickTaskAction, *m_effectiveAction; - OWidgetStack *m_stack; + Opie::OWidgetStack *m_stack; QPopupMenu* m_catMenu, *m_edit, *m_options, @@ -205,7 +203,7 @@ private slots: void beam(int uid); void show( int uid ); void edit( int uid ); - void add( const OPimRecord& ); + void add( const Opie::OPimRecord& ); 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 @@ -21,7 +21,7 @@ QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) priority3 = Resource::loadPixmap( "todo/priority3" ); priority5 = Resource::loadPixmap( "todo/priority5" ); - m_lbl = new OClickableLabel( this ); + m_lbl = new Opie::OClickableLabel( this ); m_lbl->setMinimumWidth( 15 ); m_lbl->setPixmap( priority3 ); connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); -- cgit v0.9.0.2