From: Peter Penz Date: Thu, 8 Feb 2007 20:46:49 +0000 (+0000) Subject: just a coding guideline style fix: assure that a consistent coding style is used... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/fcf8436737384a1b4483ff927faf041ba01213ea just a coding guideline style fix: assure that a consistent coding style is used within Dolphin svn path=/trunk/playground/utils/dolphin/; revision=631710 --- diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index b35e58314..439a6fd21 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -25,13 +25,12 @@ DolphinApplication::DolphinApplication() { } -/* - * cleanup what ever is left from the MainWindows - */ DolphinApplication::~DolphinApplication() { - while( m_mainWindows.count() != 0 ) + // cleanup what ever is left from the MainWindows + while (m_mainWindows.count() != 0) { delete m_mainWindows.takeFirst(); + } } DolphinApplication* DolphinApplication::app() @@ -41,24 +40,23 @@ DolphinApplication* DolphinApplication::app() DolphinMainWindow* DolphinApplication::createMainWindow() { - DolphinMainWindow* mainwindow = new DolphinMainWindow; - mainwindow->init(); - - m_mainWindows.append( mainwindow ); - return mainwindow; + DolphinMainWindow* mainWindow = new DolphinMainWindow(); + mainWindow->init(); + + m_mainWindows.append(mainWindow); + return mainWindow; } -void DolphinApplication::removeMainWindow( DolphinMainWindow *mainwindow ) +void DolphinApplication::removeMainWindow(DolphinMainWindow* mainWindow) { - m_mainWindows.removeAll( mainwindow ); + m_mainWindows.removeAll(mainWindow); } void DolphinApplication::refreshMainWindows() { - for( int i = 0; i < m_mainWindows.count(); ++i ) { + for (int i = 0; i < m_mainWindows.count(); ++i) { m_mainWindows[i]->refreshViews(); } } #include "dolphinapplication.moc" - diff --git a/src/dolphinapplication.h b/src/dolphinapplication.h index 69d306863..fc1a564c8 100644 --- a/src/dolphinapplication.h +++ b/src/dolphinapplication.h @@ -27,19 +27,19 @@ class DolphinMainWindow; /** - * - * DolphinApplication will hold application wide data which - * can be accessed. + * @brief Holds the application data which can be accessed. * At first this will hold a list of DolphinMainWindows which - * we will delete on application exit. + * we will delete on application exit. */ -class DolphinApplication : public KApplication { +class DolphinApplication : public KApplication +{ Q_OBJECT friend class DolphinMainWindow; + public: DolphinApplication(); - ~DolphinApplication(); + virtual ~DolphinApplication(); static DolphinApplication* app(); @@ -51,14 +51,11 @@ public: void refreshMainWindows(); protected: - /** - * called by the MainWindow to deregister - */ - void removeMainWindow( DolphinMainWindow* ); + /** Called by the DolphinMainWindow to deregister. */ + void removeMainWindow(DolphinMainWindow* mainWindow); private: QList m_mainWindows; }; - #endif