Commit cf11b696 authored by hjk's avatar hjk

more code cosmetics

parent 10e963fb
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "docsettingspage.h"
#include <QtGui/QFileDialog>
......@@ -42,7 +43,6 @@ DocSettingsPage::DocSettingsPage(QHelpEngine *helpEngine)
: m_helpEngine(helpEngine),
m_registeredDocs(false)
{
}
QString DocSettingsPage::name() const
......
......@@ -34,10 +34,11 @@
#ifndef DOCSETTINGSPAGE_H
#define DOCSETTINGSPAGE_H
#include <QtGui/QWidget>
#include "ui_docsettingspage.h"
#include <coreplugin/dialogs/ioptionspage.h>
#include "ui_docsettingspage.h"
#include <QtGui/QWidget>
QT_FORWARD_DECLARE_CLASS(QHelpEngine)
......
......@@ -30,18 +30,6 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
/****************************************************************************
**
** Copyright (C) 1992-$THISYEAR$ Trolltech AS. All rights reserved.
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
** $LICENSE$
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#ifndef HELP_GLOBAL_H
#define HELP_GLOBAL_H
......
......@@ -30,14 +30,15 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "helpengine.h"
#include "config.h"
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QDateTime>
#include <QtCore/QCoreApplication>
#include "helpengine.h"
#include "config.h"
using namespace Help::Internal;
static bool verifyDirectory(const QString &str)
......@@ -52,7 +53,8 @@ static bool verifyDirectory(const QString &str)
return true;
}
struct IndexKeyword {
struct IndexKeyword
{
IndexKeyword(const QString &kw, const QString &l)
: keyword(kw), link(l) {}
IndexKeyword() : keyword(QString()), link(QString()) {}
......@@ -193,12 +195,6 @@ QModelIndex IndexListModel::filter(const QString &s, const QString &real)
HelpEngine::HelpEngine(QObject *parent, const QString &defaultQtVersionPath)
: QObject(parent)
{
......@@ -344,13 +340,6 @@ QString HelpEngine::home() const
TitleMapThread::TitleMapThread(HelpEngine *he)
: QThread(he)
{
......@@ -488,9 +477,6 @@ void TitleMapThread::buildContentDict()
}
IndexThread::IndexThread(HelpEngine *he)
: QThread(he)
{
......
......@@ -30,9 +30,12 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef HELPENGINE_H
#define HELPENGINE_H
#include "docuparser.h"
#include <QtCore/QThread>
#include <QtCore/QPair>
#include <QtCore/QMap>
......@@ -40,8 +43,6 @@
#include <QtCore/QMutex>
#include <QtGui/QStringListModel>
#include "docuparser.h"
namespace Help {
namespace Internal {
......@@ -129,7 +130,7 @@ class HelpEngine : public QObject
Q_OBJECT
public:
HelpEngine(QObject *parent, const QString& defaultQtVersionPath);
HelpEngine(QObject *parent, const QString &defaultQtVersionPath);
~HelpEngine();
void init();
QList<QPair<QString, ContentList> > contents() const { return contentList; }
......@@ -176,7 +177,7 @@ private:
bool contentsOnly;
};
} //namespace Internal
} //namespace Help
} // namespace Internal
} // namespace Help
#endif
#endif // HELPENGINE_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "helpfindsupport.h"
#include "helpviewer.h"
......@@ -48,6 +49,7 @@ bool HelpFindSupport::isEnabled() const
{
return true;
}
QString HelpFindSupport::currentFindString() const
{
Q_ASSERT(m_centralWidget);
......@@ -61,8 +63,10 @@ QString HelpFindSupport::currentFindString() const
#endif
}
QString HelpFindSupport::completedFindString() const { return QString(); }
QString HelpFindSupport::completedFindString() const
{
return QString();
}
bool HelpFindSupport::findIncremental(const QString &txt, QTextDocument::FindFlags findFlags)
{
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef HELPFINDSUPPORT_H
#define HELPFINDSUPPORT_H
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "helpindexfilter.h"
#include "helpplugin.h"
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef HELPINDEXFILTER_H
#define HELPINDEXFILTER_H
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "helpmode.h"
#include "helpplugin.h"
......@@ -43,7 +44,8 @@ using namespace Help::Internal;
HelpMode::HelpMode(QWidget *widget, QWidget *centralWidget, QObject *parent):
BaseMode(tr("Help"),
Constants::ID_MODE_HELP,
QIcon((QLatin1String(":/fancyactionbar/images/mode_Reference.png"))), Constants::P_MODE_HELP, widget, parent),
QIcon((QLatin1String(":/fancyactionbar/images/mode_Reference.png"))),
Constants::P_MODE_HELP, widget, parent),
m_centralWidget(centralWidget)
{
m_centralWidget->layout()->setSpacing(0);
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef HELPMODE_H
#define HELPMODE_H
......
......@@ -44,6 +44,18 @@
#include "helpfindsupport.h"
#include "searchwidget.h"
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/minisplitter.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/rightpane.h>
#include <coreplugin/sidebar.h>
#include <coreplugin/welcomemode.h>
#include <QtCore/QDebug>
#include <QtCore/qplugin.h>
#include <QtCore/QFileInfo>
......@@ -58,18 +70,6 @@
#include <QtGui/QComboBox>
#include <QtHelp/QHelpEngine>
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanagerinterface.h>
#include <coreplugin/minisplitter.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/rightpane.h>
#include <coreplugin/sidebar.h>
#include <coreplugin/welcomemode.h>
using namespace Help;
using namespace Help::Internal;
......
......@@ -35,6 +35,7 @@
#define HELPPLUGIN_H
#include "help_global.h"
#include <extensionsystem/iplugin.h>
#include <QtCore/QMap>
......
......@@ -30,6 +30,11 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "indextoolwindow.h"
#include "helpengine.h"
#include "topicchooser.h"
#include <QtCore/QDebug>
#include <QtGui/QKeyEvent>
#include <QtGui/QFocusEvent>
......@@ -39,10 +44,6 @@
#include <QtGui/QListView>
#include <QtGui/QApplication>
#include "indextoolwindow.h"
#include "helpengine.h"
#include "topicchooser.h"
using namespace Help::Internal;
IndexToolWidget::IndexToolWidget()
......
......@@ -30,14 +30,15 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef INDEXTOOLWINDOW_H
#define INDEXTOOLWINDOW_H
#include <coreplugin/iview.h>
#include <QtCore/QModelIndex>
#include <QtGui/QWidget>
#include <coreplugin/iview.h>
class QListView;
class QLineEdit;
......
......@@ -31,8 +31,8 @@
**
***************************************************************************/
#ifndef INDEXWINDOW
#define INDEXWINDOW
#ifndef INDEXWINDOW_H
#define INDEXWINDOW_H
#include <QtCore/QUrl>
#include <QtGui/QWidget>
......@@ -79,4 +79,4 @@ private:
QT_END_NAMESPACE
#endif
#endif // INDEXWINDOW_H
......@@ -85,4 +85,4 @@ private:
} // namespace Internal
} // namespace Help
#endif // SEARCHWIDGET_H
#endif // SEARCHWIDGET_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "annotationhighlighter.h"
namespace Perforce {
......@@ -48,5 +49,5 @@ QString PerforceAnnotationHighlighter::changeNumber(const QString &block) const
return pos > 1 ? block.left(pos) : QString();
}
}
}
} // Internal
} // Perforce
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef ANNOTATIONHIGHLIGHTER_H
#define ANNOTATIONHIGHLIGHTER_H
......@@ -52,7 +53,7 @@ private:
const QChar m_colon;
};
} //namespace Perforce
} //namespace Internal
} // namespace Perforce
} // namespace Internal
#endif
#endif // ANNOTATIONHIGHLIGHTER_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include <QtGui/QIntValidator>
#include "changenumberdialog.h"
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CHANGENUMBERDIALOG_H
#define CHANGENUMBERDIALOG_H
......@@ -53,9 +54,7 @@ private:
};
} //namespace Perforce
} //namespace Internal
#endif
} // namespace Perforce
} // namespace Internal
#endif // CHANGENUMBERDIALOG_H
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef P4_API_INCL
#define P4_API_INCL
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include <QtCore/QRegExp>
#include "pendingchangesdialog.h"
......
......@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PENDINGCHANGESDIALOG_H
#define PENDINGCHANGESDIALOG_H
......@@ -52,8 +53,8 @@ private:
Ui::PendingChangesDialog m_ui;
};
} //namespace Perforce
} //namespace Internal
} // namespace Perforce
} // namespace Internal
#endif
#endif // PENDINGCHANGESDIALOG_H
......@@ -30,24 +30,27 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PERFORCE_CONSTANTS_H
#define PERFORCE_CONSTANTS_H
namespace Perforce {
namespace Constants {
const char * const C_PERFORCEEDITOR = "Perforce Editor";
namespace Constants {
const char * const C_PERFORCEEDITOR = "Perforce Editor";
const char * const PERFORCEEDITOR_KIND = "Perforce Editor";
const char * const C_PERFORCESUBMITEDITOR = "Perforce Submit Editor";
const char * const PERFORCESUBMITEDITOR_KIND = "Perforce Submit Editor";
const char * const ICON_SUBMIT = ":/trolltech.perforce/images/submit.png";
const char * const ICON_DIFF = ":/trolltech.perforce/images/diff.png";
const char * const SUBMIT_CURRENT = "Nokia.Perforce.SubmitCurrentLog";
const char * const DIFF_SELECTED = "Nokia.Perforce.DiffSelectedFilesInLog";
const char * const SUBMIT_MIMETYPE = "application/vnd.nokia.text.p4.submit";
const char * const PERFORCEEDITOR_KIND = "Perforce Editor";
const char * const C_PERFORCESUBMITEDITOR = "Perforce Submit Editor";
const char * const PERFORCESUBMITEDITOR_KIND = "Perforce Submit Editor";
const char * const ICON_SUBMIT = ":/trolltech.perforce/images/submit.png";
const char * const ICON_DIFF = ":/trolltech.perforce/images/diff.png";
const char * const SUBMIT_CURRENT = "Nokia.Perforce.SubmitCurrentLog";
const char * const DIFF_SELECTED = "Nokia.Perforce.DiffSelectedFilesInLog";
const char * const SUBMIT_MIMETYPE = "application/vnd.nokia.text.p4.submit";
enum { debug = 0 };
enum { debug = 0 };