Commit df7aacd6 authored by hjk's avatar hjk

more file cosmetics

parent 2ef79dca
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "rightpane.h"
#include <QtGui/QVBoxLayout>
......
......@@ -30,16 +30,18 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef RIGHTPANE_H
#define RIGHTPANE_H
#include "core_global.h"
#include <QtGui/QWidget>
#include <QtCore/QSettings>
namespace Core {
class IMode;
class IMode;
class RightPaneWidget;
// TODO: The right pane works only for the help plugin atm.
......@@ -104,5 +106,4 @@ private:
} // namespace Core
#endif // RIGHTPANE_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef METATYPEDECLARATIONS_H
#define METATYPEDECLARATIONS_H
......
......@@ -30,9 +30,14 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "qworkbench_wrapper.h"
#include <wrap_helpers.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/editormanager/editorgroup.h>
#include <QtCore/QDebug>
#include <QtCore/QSettings>
......@@ -41,9 +46,6 @@
#include <QtGui/QToolBar>
#include <QtScript/QScriptEngine>
#include <coreplugin/messagemanager.h>
#include <coreplugin/editormanager/editorgroup.h>
namespace {
enum { debugQWorkbenchWrappers = 0 };
}
......@@ -377,5 +379,5 @@ Core::EditorGroup *EditorGroupPrototype::callee() const
return rc;
}
}
}
} // namespace Internal
} // namespace Core
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QWORKBENCH_WRAPPER_H
#define QWORKBENCH_WRAPPER_H
......@@ -45,7 +46,8 @@ namespace Internal {
// Script prototype for the core interface.
class CorePrototype : public QObject, public QScriptable {
class CorePrototype : public QObject, public QScriptable
{
Q_OBJECT
Q_PROPERTY(Core::MessageManager* messageManager READ messageManager DESIGNABLE false SCRIPTABLE true STORED false)
......@@ -97,7 +99,8 @@ public slots:
// Script prototype for the file manager interface.
class FileManagerPrototype : public QObject, public QScriptable {
class FileManagerPrototype : public QObject, public QScriptable
{
Q_OBJECT
Q_PROPERTY(QStringList recentFiles READ recentFiles DESIGNABLE false SCRIPTABLE true STORED false)
......@@ -163,7 +166,8 @@ private:
// Script prototype for the editor manager interface.
class EditorManagerPrototype : public QObject, public QScriptable {
class EditorManagerPrototype : public QObject, public QScriptable
{
Q_OBJECT
Q_PROPERTY(Core::IEditor* currentEditor READ currentEditor WRITE setCurrentEditor DESIGNABLE false SCRIPTABLE true STORED false)
Q_PROPERTY(QList<Core::IEditor*> openedEditors READ openedEditors DESIGNABLE false SCRIPTABLE true STORED false)
......@@ -195,7 +199,8 @@ private:
// Script prototype for the editor interface.
class EditorPrototype : public QObject, public QScriptable {
class EditorPrototype : public QObject, public QScriptable
{
Q_OBJECT
Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName DESIGNABLE false SCRIPTABLE true STORED false)
Q_PROPERTY(QString kind READ kind DESIGNABLE false SCRIPTABLE true STORED false)
......@@ -228,7 +233,8 @@ private:
// Script prototype for the editor group interface with Script-managed life cycle.
class EditorGroupPrototype : public QObject, public QScriptable {
class EditorGroupPrototype : public QObject, public QScriptable
{
Q_OBJECT
Q_PROPERTY(int editorCount READ editorCount DESIGNABLE false SCRIPTABLE true STORED false)
Q_PROPERTY(Core::IEditor* currentEditor READ currentEditor WRITE setCurrentEditor DESIGNABLE false SCRIPTABLE true STORED false)
......@@ -259,4 +265,4 @@ private:
} // namespace Internal
} // namespace Core
#endif //QWORKBENCH_WRAPPER_H
#endif // QWORKBENCH_WRAPPER_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "scriptmanager.h"
#include "qworkbench_wrapper.h"
#include "metatypedeclarations.h"
......@@ -309,5 +310,5 @@ QString ScriptManager::engineError(QScriptEngine &scriptEngine)
return QObject::tr("Unknown error");
}
}
}
} // namespace Internal
} // namespace Core
......@@ -30,16 +30,17 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SCRIPTMANAGER_H
#define SCRIPTMANAGER_H
#include <coreplugin/scriptmanager/scriptmanagerinterface.h>
#include <coreplugin/icore.h>
#include <QtCore/QObject>
#include <QtCore/QList>
#include <QtScript/QScriptEngine>
#include <coreplugin/scriptmanager/scriptmanagerinterface.h>
#include <coreplugin/icore.h>
namespace Core {
namespace Internal {
......@@ -68,4 +69,4 @@ private:
} // namespace Internal
} // namespace Core
#endif //SCRIPTMANAGER_H
#endif // SCRIPTMANAGER_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SCRIPTMANAGERINTERFACE_H
#define SCRIPTMANAGERINTERFACE_H
......
......@@ -30,9 +30,11 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "sidebar.h"
#include "imode.h"
#include "modemanager.h"
#include "actionmanager/actionmanagerinterface.h"
#include <QtCore/QDebug>
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SIDEBAR_H
#define SIDEBAR_H
......
......@@ -30,11 +30,11 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "styleanimator.h"
#include <QtGui/QStyleOption>
Animation * StyleAnimator::widgetAnimation(const QWidget *widget) const
{
if (!widget)
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef ANIMATION_H
#define ANIMATION_H
......
......@@ -30,20 +30,23 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "stylehelper.h"
#include <QtGui/QPixmapCache>
#include <QtGui/QWidget>
// Clamps float color values within (0, 255)
static int clamp(float x) {
static int clamp(float x)
{
const int val = x > 255 ? 255 : static_cast<int>(x);
return val < 0 ? 0 : val;
}
// Clamps float color values within (0, 255)
/*
static int range(float x, int min, int max) {
static int range(float x, int min, int max)
{
int val = x > max ? max : x;
return val < min ? min : val;
}
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef STYLEHELPER_H
#define STYLEHELPER_H
......@@ -43,7 +44,8 @@
// Helper class holding all custom color values
class CORE_EXPORT StyleHelper {
class CORE_EXPORT StyleHelper
{
public:
// Height of the project explorer navigation bar
static int navigationWidgetHeight() { return 24; }
......
......@@ -30,19 +30,19 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "tabpositionindicator.h"
#include <QtGui/QPainter>
#include <QtGui/QPaintEvent>
#include <QtGui/QBrush>
#include <QtGui/QPalette>
#include "tabpositionindicator.h"
using namespace Core::Internal;
TabPositionIndicator::TabPositionIndicator()
: QWidget(0, Qt::ToolTip)
{
}
void TabPositionIndicator::paintEvent(QPaintEvent *event)
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef TABPOSITIONINDICATOR_H
#define TABPOSITIONINDICATOR_H
......@@ -43,9 +44,10 @@ namespace Internal {
class TabPositionIndicator : public QWidget
{
Q_OBJECT
public:
TabPositionIndicator();
inline int indicatorWidth() { return TABPOSITIONINDICATOR_WIDTH; }
int indicatorWidth() { return TABPOSITIONINDICATOR_WIDTH; }
private:
void paintEvent(QPaintEvent *event);
......@@ -54,4 +56,4 @@ private:
} // namespace Internal
} // namespace Core
#endif //TABPOSITIONINDICATOR_H
#endif // TABPOSITIONINDICATOR_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "uniqueidmanager.h"
#include "coreconstants.h"
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef UNIQUEIDMANAGER_H
#define UNIQUEIDMANAGER_H
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "variablemanager.h"
using namespace Core;
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef VARIABLEMANAGER_H
#define VARIABLEMANAGER_H
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "vcsmanager.h"
#include "iversioncontrol.h"
......@@ -110,4 +111,4 @@ void VCSManager::showDeleteDialog(const QString &fileName)
}
}
}
} // namespace Core
......@@ -30,11 +30,12 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef VCSMANAGER_H
#define VCSMANAGER_H
#include "core_global.h"
#include <QtCore/QString>
namespace Core {
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "versiondialog.h"
#include "coreconstants.h"
#include "coreimpl.h"
......@@ -46,8 +47,8 @@ using namespace Core::Constants;
#include <QtGui/QDialogButtonBox>
#include <QtGui/QTextBrowser>
VersionDialog::VersionDialog(QWidget *parent):
QDialog(parent)
VersionDialog::VersionDialog(QWidget *parent)
: QDialog(parent)
{
// We need to set the window icon explicitly here since for some reason the
// application icon isn't used when the size of the dialog is fixed (at least not on X11/GNOME)
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef VERSIONDIALOG_H
#define VERSIONDIALOG_H
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "viewmanager.h"
#include "coreconstants.h"
......@@ -37,24 +38,23 @@
#include "uniqueidmanager.h"
#include "iview.h"
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/icommand.h>
#include <extensionsystem/ExtensionSystemInterfaces>
#include <aggregation/aggregate.h>
#include <QtCore/QSettings>
#include <QtGui/QAction>
#include <QtGui/QActionGroup>
#include <QtGui/QComboBox>
#include <QtGui/QDockWidget>
#include <QtGui/QVBoxLayout>
#include <QtGui/QMenu>
#include <QtGui/QStatusBar>
#include <QtGui/QHBoxLayout>
#include <QtGui/QLabel>
#include <QtGui/QComboBox>
#include <QtGui/QMenu>
#include <QtGui/QStackedWidget>
#include <QtGui/QStatusBar>
#include <QtGui/QToolButton>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/actionmanager/icommand.h>
#include <extensionsystem/ExtensionSystemInterfaces>
#include <aggregation/aggregate.h>
#include <QtGui/QHBoxLayout>
#include <QtGui/QVBoxLayout>
using namespace Core;
using namespace Core::Internal;
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef VIEWMANAGER_H
#define VIEWMANAGER_H
......@@ -83,4 +84,4 @@ private:
} // namespace Internal
} // namespace Core
#endif //VIEWMANAGER_H
#endif // VIEWMANAGER_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef VIEWMANAGERINTERFACE_H
#define VIEWMANAGERINTERFACE_H
......@@ -59,6 +60,6 @@ public:
virtual IView * view(const QString & id) = 0;
};
} //namespace Core
} // namespace Core
#endif //VIEWMANAGERINTERFACE_H
#endif // VIEWMANAGERINTERFACE_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "welcomemode.h"
#include "coreconstants.h"
#include "uniqueidmanager.h"
......@@ -65,7 +66,8 @@ static QString readFile(const QString &name)
return ts.readAll();
}
struct WelcomeModePrivate {
struct WelcomeModePrivate
{
WelcomeModePrivate();
QWidget *m_widget;
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef WELCOMEMODE_H
#define WELCOMEMODE_H
......@@ -44,7 +45,6 @@ class QLabel;
QT_END_NAMESPACE
namespace Core {
namespace Internal {
struct WelcomeModePrivate;
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "cpasterplugin.h"
#include "ui_pasteselect.h"
......@@ -64,9 +65,7 @@ using namespace TextEditor;
Core::ICore *gCoreInstance = NULL;
CodepasterPlugin::CodepasterPlugin()
: m_settingsPage(0)
, m_fetcher(0)
, m_poster(0)
: m_settingsPage(0), m_fetcher(0), m_poster(0)
{
}
......@@ -125,7 +124,8 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
void CodepasterPlugin::extensionsInitialized()
{
m_projectExplorer = ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::ProjectExplorerPlugin>();
m_projectExplorer = ExtensionSystem::PluginManager::instance()
->getObject<ProjectExplorer::ProjectExplorerPlugin>();
}
void CodepasterPlugin::post()
......@@ -268,18 +268,14 @@ void CustomFetcher::list(QListWidget* list)
Fetcher::fetch(url);
}
CustomPoster::CustomPoster(const QString &host
, bool copyToClipboard
, bool displayOutput)
: Poster(host)
, m_copy(copyToClipboard)
, m_output(displayOutput)
CustomPoster::CustomPoster(const QString &host, bool copyToClipboard, bool displayOutput)
: Poster(host), m_copy(copyToClipboard), m_output(displayOutput)
{
// cpaster calls QCoreApplication::exit which we want to avoid here
disconnect(this, SIGNAL(requestFinished(int,bool))
,this, SLOT(gotRequestFinished(int,bool)));
connect(this, SIGNAL(requestFinished(int,bool))
, SLOT(customRequestFinished(int,bool)));
disconnect(this, SIGNAL(requestFinished(int,bool)),
this, SLOT(gotRequestFinished