mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-02 14:45:04 +00:00
just a coding guideline style fix: assure that a consistent coding style is used within Dolphin
svn path=/trunk/playground/utils/dolphin/; revision=631710
This commit is contained in:
parent
ee4e21530b
commit
fcf8436737
|
@ -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"
|
||||
|
||||
|
|
|
@ -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<DolphinMainWindow*> m_mainWindows;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue