[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bgluon=5D_creator/=3A_Refactor_the_header_include_or?=
From:       Laszlo Papp <djszapi () archlinux ! us>
Date:       2011-01-28 22:26:41
Message-ID: 20110128222641.5381AA60B1 () git ! kde ! org
[Download RAW message or body]

Git commit 8773fde905d4281b7831bf8a337afe4f265d1522 by Laszlo Papp.
Pushed by lpapp into branch 'master'.

Refactor the header include order and remove the unneccesary 'this'S.

M  +2    -3    creator/lib/historymanager.cpp     
M  +2    -4    creator/lib/objectmanager.cpp     
M  +18   -16   creator/plugins/docks/projectdock/projectdock.cpp     
M  +2    -1    creator/plugins/docks/projectdock/projectdock.h     

http://commits.kde.org/fad2ae7b/8773fde905d4281b7831bf8a337afe4f265d1522

diff --git a/creator/lib/historymanager.cpp b/creator/lib/historymanager.cpp
index 0708e9a..28ff128 100644
--- a/creator/lib/historymanager.cpp
+++ b/creator/lib/historymanager.cpp
@@ -73,7 +73,8 @@ void HistoryManager::setClean()
     d->stack->setClean();
 }
 
-HistoryManager::HistoryManager() : d( new HistoryManagerPrivate )
+HistoryManager::HistoryManager()
+    : d( new HistoryManagerPrivate )
 {
     connect( d->stack, SIGNAL( canRedoChanged( bool ) ), SIGNAL( canRedoChanged( \
                bool ) ) );
     connect( d->stack, SIGNAL( canUndoChanged( bool ) ), SIGNAL( canUndoChanged( \
bool ) ) ); @@ -84,5 +85,3 @@ HistoryManager::~HistoryManager()
 {
     delete d;
 }
-
-//#include "historymanager.moc"
diff --git a/creator/lib/objectmanager.cpp b/creator/lib/objectmanager.cpp
index 4896dbe..a139463 100644
--- a/creator/lib/objectmanager.cpp
+++ b/creator/lib/objectmanager.cpp
@@ -252,13 +252,11 @@ ObjectManager::ObjectManager()
     m_objectId = 0;
     m_sceneId = 0;
 
-    connect( KDirWatch::self(), SIGNAL( dirty( const QString& ) ), this, SLOT( \
                assetDirty( const QString& ) ) );
-    connect( KDirWatch::self(), SIGNAL( created( const QString& ) ), this, SLOT( \
assetDirty( const QString& ) ) ); +    connect( KDirWatch::self(), SIGNAL( dirty( \
const QString& ) ), SLOT( assetDirty( const QString& ) ) ); +    connect( \
KDirWatch::self(), SIGNAL( created( const QString& ) ), SLOT( assetDirty( const \
QString& ) ) );  }
 
 ObjectManager::~ObjectManager()
 {
 
 }
-
-//#include "objectmanager.moc"
diff --git a/creator/plugins/docks/projectdock/projectdock.cpp \
b/creator/plugins/docks/projectdock/projectdock.cpp index 12a174c..fa75e4e 100644
--- a/creator/plugins/docks/projectdock/projectdock.cpp
+++ b/creator/plugins/docks/projectdock/projectdock.cpp
@@ -1,6 +1,7 @@
 /******************************************************************************
  * This file is part of the Gluon Development Platform
  * Copyright (c) 2010 Arjen Hiemstra <ahiemstra@heimr.nl>
+ * Copyright (c) 2011 Laszlo Papp <djszapi@archlinux.us>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -19,6 +20,12 @@
 
 #include "projectdock.h"
 
+#include "lib/selectionmanager.h"
+#include "objectmanager.h"
+#include "filemanager.h"
+#include "historymanager.h"
+#include "newobjectcommand.h"
+
 #include "core/debughelper.h"
 #include "core/gluon_global.h"
 #include "engine/game.h"
@@ -28,26 +35,21 @@
 #include "models/projectmodel.h"
 #include "models/modeltest.h"
 #include "engine/gameproject.h"
-#include "lib/selectionmanager.h"
-
-#include <QtGui/QTreeView>
-#include <QtGui/QMenu>
 
 #include <KDebug>
 #include <KInputDialog>
 #include <KMessageBox>
 #include <KLocalizedString>
-#include <QFile>
-#include <QFileInfo>
 #include <KRun>
-#include <historymanager.h>
-#include <newobjectcommand.h>
-#include <QDir>
 #include <KStandardDirs>
-#include <QVBoxLayout>
 #include <KToolBar>
-#include <objectmanager.h>
-#include <filemanager.h>
+
+#include <QtCore/QFile>
+#include <QtCore/QFileInfo>
+#include <QtCore/QDir>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QTreeView>
+#include <QtGui/QMenu>
 
 using namespace GluonCreator;
 
@@ -178,12 +180,12 @@ ProjectDock::ProjectDock( const QString& title, QWidget* \
parent, Qt::WindowFlags  d->view->setAcceptDrops( true );
     d->view->setContextMenuPolicy( Qt::CustomContextMenu );
     d->view->setEditTriggers( QAbstractItemView::NoEditTriggers );
-    connect( d->view, SIGNAL( customContextMenuRequested( const QPoint& ) ), this, \
                SLOT( showContextMenuRequested( const QPoint& ) ) );
-    connect( d->view->selectionModel(), SIGNAL( selectionChanged( QItemSelection, \
QItemSelection ) ), this, SLOT( selectionChanged( QItemSelection, QItemSelection ) ) \
); +    connect( d->view, SIGNAL( customContextMenuRequested( const QPoint& ) ), \
SLOT( showContextMenuRequested( const QPoint& ) ) ); +    connect( \
d->view->selectionModel(), SIGNAL( selectionChanged( QItemSelection, QItemSelection ) \
), SLOT( selectionChanged( QItemSelection, QItemSelection ) ) );  
     d->model->setProject( GluonEngine::Game::instance()->gameProject() );
     connect( GluonEngine::Game::instance(), SIGNAL( currentProjectChanged( \
GluonEngine::GameProject* ) ), SLOT( currentProjectChanged( GluonEngine::GameProject* \
                ) ) );
-    connect( d->view, SIGNAL( doubleClicked( QModelIndex ) ), this, SLOT( activated( \
QModelIndex ) ) ); +    connect( d->view, SIGNAL( doubleClicked( QModelIndex ) ), \
SLOT( activated( QModelIndex ) ) );  
     QWidget* widget = new QWidget( this );
     QVBoxLayout* layout = new QVBoxLayout();
@@ -273,7 +275,7 @@ void ProjectDock::showContextMenuRequested( const QPoint& pos )
     QMenu menu( static_cast<GluonCore::GluonObject*>( index.internalPointer() \
)->name(), this );  menu.addActions( d->menuForObject( index ) );
     menu.exec( d->view->mapToGlobal( pos ) );
-    connect( &menu, SIGNAL( aboutToHide() ), this, SLOT( contextMenuHiding() ) );
+    connect( &menu, SIGNAL( aboutToHide() ), SLOT( contextMenuHiding() ) );
 }
 
 void ProjectDock::contextMenuHiding()
diff --git a/creator/plugins/docks/projectdock/projectdock.h \
b/creator/plugins/docks/projectdock/projectdock.h index bfc5ed2..56727b7 100644
--- a/creator/plugins/docks/projectdock/projectdock.h
+++ b/creator/plugins/docks/projectdock/projectdock.h
@@ -1,6 +1,7 @@
 /******************************************************************************
  * This file is part of the Gluon Development Platform
  * Copyright (c) 2010 Arjen Hiemstra <ahiemstra@heimr.nl>
+ * Copyright (c) 2011 Laszlo Papp <djszapi@archlinux.us>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -37,7 +38,7 @@ namespace GluonCreator
             Q_OBJECT
         public:
             explicit ProjectDock( const QString& title, QWidget* parent = 0, \
                Qt::WindowFlags flags = 0 );
-            ~ProjectDock();
+            virtual ~ProjectDock();
 
         public slots:
             void activated( QModelIndex index );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic