more cosmetic changes

This commit is contained in:
hjk
2008-12-02 14:09:21 +01:00
parent 1472bdb0cc
commit f61e8672db
262 changed files with 912 additions and 633 deletions

View File

@@ -30,9 +30,6 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
/*
TRANSLATOR qdesigner_internal::ResourceModel
*/
#include "resourcefile_p.h"
@@ -50,6 +47,10 @@ TRANSLATOR qdesigner_internal::ResourceModel
QT_BEGIN_NAMESPACE
/*
TRANSLATOR qdesigner_internal::ResourceModel
*/
namespace qdesigner_internal {
/******************************************************************************
@@ -956,7 +957,7 @@ QString ResourceModel::resourcePath(const QString &prefix, const QString &file)
return QDir::cleanPath(rc);
}
QMimeData *ResourceModel::mimeData(const QModelIndexList & indexes) const
QMimeData *ResourceModel::mimeData(const QModelIndexList &indexes) const
{
if (indexes.size() != 1)
return 0;
@@ -977,6 +978,7 @@ QMimeData *ResourceModel::mimeData(const QModelIndexList & indexes) const
rc->setText(doc.toString());
return rc;
}
} // namespace qdesigner_internal
QT_END_NAMESPACE

View File

@@ -30,8 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef RESOURCEFILE_H
#define RESOURCEFILE_H
#ifndef RESOURCEFILE__P_H
#define RESOURCEFILE__P_H
#include "namespace_global.h"
@@ -62,8 +63,6 @@ struct Prefix;
*/
class Node
{
File *m_file;
Prefix *m_prefix;
protected:
Node(File *file, Prefix *prefix) : m_file(file), m_prefix(prefix)
{
@@ -72,6 +71,9 @@ protected:
public:
File * file() { return m_file; }
Prefix * prefix() { Q_ASSERT(m_prefix != NULL); return m_prefix; }
private:
File *m_file;
Prefix *m_prefix;
};
/*!
@@ -95,7 +97,8 @@ typedef QList<File *> FileList;
Represents a prefix node in a \l ResourceFile tree.
*/
struct Prefix : public Node {
struct Prefix : public Node
{
Prefix(const QString &_name = QString(), const QString &_lang = QString(), const FileList &_file_list = FileList())
: Node(NULL, this), name(_name), lang(_lang), file_list(_file_list) {}
~Prefix()
@@ -263,4 +266,4 @@ private:
QT_END_NAMESPACE
#endif // RESOURCEFILE_H
#endif // RESOURCEFILE_P_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "resourceview.h"
#include "undocommands_p.h"
@@ -658,4 +659,4 @@ bool ResourceView::resourceDragEnabled() const
return m_qrcModel->resourceDragEnabled();
}
}
} // namespace SharedTools

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef RESOURCEVIEW_H
#define RESOURCEVIEW_H
@@ -42,10 +43,12 @@
using namespace qdesigner_internal;
QT_FORWARD_DECLARE_CLASS(QAction)
QT_FORWARD_DECLARE_CLASS(QMenu)
QT_FORWARD_DECLARE_CLASS(QMouseEvent)
QT_FORWARD_DECLARE_CLASS(QUndoStack)
QT_BEGIN_NAMESPACE
class QAction;
class QMenu;
class QMouseEvent;
class QUndoStack;
QT_END_NAMESPACE
namespace SharedTools {
@@ -178,6 +181,6 @@ private:
int m_mergeId;
};
}
} // namespace SharedTools
#endif //RESOURCEVIEW_H
#endif // RESOURCEVIEW_H

View File

@@ -30,12 +30,13 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "qrceditor.h"
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QApplication app(argc, argv);
MainWindow mw;
mw.show();
return app.exec();

View File

@@ -30,16 +30,16 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "mainwindow.h"
#include "qrceditor.h"
#include <QMenuBar>
#include <QAction>
#include <QVBoxLayout>
#include <QDebug>
#include <QFileDialog>
#include <QMenuBar>
#include <QStatusBar>
#include <qdebug.h>
#include <QVBoxLayout>
MainWindow::MainWindow() :
m_qrcEditor(new SharedTools::QrcEditor())
@@ -67,7 +67,7 @@ MainWindow::MainWindow() :
void MainWindow::slotOpen()
{
const QString fileName = QFileDialog::getOpenFileName (this, tr("Choose resource file"),
const QString fileName = QFileDialog::getOpenFileName(this, tr("Choose resource file"),
QString(),
tr("Resource files (*.qrc)"));
if (fileName.isEmpty())
@@ -85,7 +85,7 @@ void MainWindow::slotSave()
QString fileName = oldFileName;
if (fileName.isEmpty()) {
fileName = QFileDialog::getSaveFileName (this, tr("Save resource file"),
fileName = QFileDialog::getSaveFileName(this, tr("Save resource file"),
QString(),
tr("Resource files (*.qrc)"));
if (fileName.isEmpty())

View File

@@ -30,8 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef _MAINWINDOW_
#define _MAINWINDOW_
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
@@ -39,7 +40,8 @@ namespace SharedTools {
class QrcEditor;
}
class MainWindow : public QMainWindow {
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
@@ -51,6 +53,6 @@ private slots:
private:
SharedTools::QrcEditor *m_qrcEditor;
}; // MainWindow
};
#endif
#endif // MAINWINDOW_H

View File

@@ -30,18 +30,6 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
/****************************************************************************
**
** Copyright (C) 2008-$THISYEAR$ $TROLLTECH$. All rights reserved.
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
** $TROLLTECH_DUAL_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.
**
****************************************************************************/
#include "undocommands_p.h"
@@ -104,7 +92,7 @@ bool ModifyPropertyCommand::mergeWith(const QUndoCommand * command)
{
const ModifyPropertyCommand * const brother
= dynamic_cast<const ModifyPropertyCommand *>(command);
if ((command == NULL) || (m_property != brother->m_property))
if (command == NULL || m_property != brother->m_property)
return false;
// Choose older command (this) and forgot the other
@@ -125,9 +113,8 @@ void ModifyPropertyCommand::undo()
void ModifyPropertyCommand::redo()
{
// Prevent execution from within QUndoStack::push
if (m_after.isNull()) {
if (m_after.isNull())
return;
}
// Bring back text before undo
Q_ASSERT(m_view != NULL);

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef UNDO_COMMANDS_H
#define UNDO_COMMANDS_H
@@ -38,7 +39,9 @@
#include <QtCore/QString>
#include <QtGui/QUndoCommand>
QT_FORWARD_DECLARE_CLASS(QModelIndex);
QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE
namespace SharedTools {

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "qscripthighlighter.h"
#include <QtCore/QSet>
@@ -105,7 +106,7 @@ static const QSet<QString> &qscriptKeywords() {
}
namespace SharedTools {
namespace SharedTools {
QScriptHighlighter::QScriptHighlighter(QTextDocument *parent)
: QSyntaxHighlighter(parent)
@@ -438,10 +439,9 @@ void QScriptHighlighter::highlightKeyword(int currentPos, const QString &buffer)
if (buffer.at(0) == QLatin1Char('Q')) {
setFormat(currentPos - buffer.length(), buffer.length(), m_formats[TypeFormat]);
} else {
if (qscriptKeywords().contains(buffer)) {
if (qscriptKeywords().contains(buffer))
setFormat(currentPos - buffer.length(), buffer.length(), m_formats[KeywordFormat]);
}
}
}
const QVector<QTextCharFormat> &QScriptHighlighter::defaultFormats()
@@ -466,7 +466,8 @@ void QScriptHighlighter::setFormats(const QVector<QTextCharFormat> &s)
qCopy(s.constBegin(), s.constEnd(), m_formats);
}
int QScriptHighlighter::onBlockStart() {
int QScriptHighlighter::onBlockStart()
{
int state = 0;
int previousState = previousBlockState();
if (previousState != -1)
@@ -476,5 +477,6 @@ int QScriptHighlighter::onBlockStart() {
void QScriptHighlighter::onOpeningParenthesis(QChar, int) {}
void QScriptHighlighter::onClosingParenthesis(QChar, int) {}
void QScriptHighlighter::onBlockEnd(int state, int) { return setCurrentBlockState(state); }
}
} // namespace SharedTools

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QSCRIPTSYNTAXHIGHLIGHTER_H
#define QSCRIPTSYNTAXHIGHLIGHTER_H
@@ -59,7 +60,8 @@ private:
virtual int onBlockStart(); // returns the blocks initial state
virtual void onOpeningParenthesis(QChar parenthesis, int pos);
virtual void onClosingParenthesis(QChar parenthesis, int pos);
virtual void onBlockEnd(int state, int firstNonSpace); // sets the enriched user state, or simply calls setCurrentBlockState(state);
// sets the enriched user state, or simply calls setCurrentBlockState(state);
virtual void onBlockEnd(int state, int firstNonSpace);
void highlightKeyword(int currentPos, const QString &buffer);

View File

@@ -30,7 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "qscripthighlighter.h"
#include <QTextEdit>
#include <QMainWindow>
#include <QApplication>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QTEXTENDED_INTEGRATION
#define QTEXTENDED_INTEGRATION

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "qtlockedfile.h"
namespace SharedTools {
@@ -158,4 +159,4 @@ QtLockedFile::LockMode QtLockedFile::lockMode() const
Destroys the \e QtLockedFile object. If any locks were held, they are released.
*/
}
} // namespace SharedTools

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QTLOCKEDFILE_H
#define QTLOCKEDFILE_H
@@ -75,6 +76,6 @@ private:
LockMode m_lock_mode;
};
}
} // namespace SharedTools
#endif
#endif // QTLOCKEDFILE_H

View File

@@ -30,13 +30,14 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "qtlockedfile.h"
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include "qtlockedfile.h"
namespace SharedTools {
bool QtLockedFile::lock(LockMode mode, bool block)
@@ -107,4 +108,4 @@ QtLockedFile::~QtLockedFile()
unlock();
}
}
} // namespace SharedTools

View File

@@ -30,7 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "qtlockedfile.h"
#include <qt_windows.h>
#include <QtCore/QFileInfo>
@@ -202,4 +204,4 @@ QtLockedFile::~QtLockedFile()
}
}
}
} // namespace SharedTools

View File

@@ -32,6 +32,7 @@
***************************************************************************/
#include "qtlocalpeer.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QTime>
@@ -176,4 +177,4 @@ void QtLocalPeer::receiveConnection()
emit messageReceived(message); // ##(might take a long time to return)
}
}
} // namespace SharedTools

View File

@@ -31,11 +31,11 @@
**
***************************************************************************/
#include "qtlockedfile.h"
#include <QtNetwork/QLocalServer>
#include <QtNetwork/QLocalSocket>
#include <QtCore/QDir>
#include <qtlockedfile.h>
namespace SharedTools {
@@ -66,4 +66,4 @@ private:
static const char* ack;
};
} // SharedTools
} // namespace SharedTools

View File

@@ -33,6 +33,7 @@
#include "qtsingleapplication.h"
#include "qtlocalpeer.h"
#include <QtGui/QWidget>
#include <QtGui/QFileOpenEvent>
@@ -80,7 +81,8 @@ QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Q
sysInit();
}
QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE colormap)
QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId,
int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE colormap)
: QApplication(dpy, argc, argv, visual, colormap)
{
sysInit(appId);
@@ -115,13 +117,13 @@ QString QtSingleApplication::id() const
}
void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage)
void QtSingleApplication::setActivationWindow(QWidget *aw, bool activateOnMessage)
{
actWin = aw;
if (activateOnMessage)
connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
connect(peer, SIGNAL(messageReceived(QString)), this, SLOT(activateWindow()));
else
disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
disconnect(peer, SIGNAL(messageReceived(QString)), this, SLOT(activateWindow()));
}
@@ -140,4 +142,4 @@ void QtSingleApplication::activateWindow()
}
}
}
} // namespace SharedTools

View File

@@ -82,4 +82,4 @@ private:
QWidget *actWin;
};
}
} // namespace SharedTools

View File

@@ -40,7 +40,7 @@ QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv)
: QCoreApplication(argc, argv)
{
peer = new QtLocalPeer(this);
connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&)));
connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString)));
}
@@ -48,7 +48,7 @@ QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc
: QCoreApplication(argc, argv)
{
peer = new QtLocalPeer(this, appId);
connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&)));
connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString)));
}
@@ -69,4 +69,4 @@ QString QtSingleCoreApplication::id() const
return peer->applicationId();
}
}
} // namespace SharedTools

View File

@@ -60,4 +60,4 @@ private:
QtLocalPeer* peer;
};
}
} // namespace SharedTools

View File

@@ -30,13 +30,14 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef INTERFACE_WRAP_HELPERS_H
#define INTERFACE_WRAP_HELPERS_H
#include <extensionsystem/ExtensionSystemInterfaces>
#include <QtScript/QScriptEngine>
namespace SharedTools {
namespace SharedTools {
// Convert a QObjectInterface to Scriptvalue
// To be registered as a magic creation function with qScriptRegisterMetaType().
@@ -87,6 +88,6 @@ static void registerQObjectInterface(QScriptEngine &engine)
Q_UNUSED(metaTypeId);
}
}
} // namespace SharedTools
#endif
#endif // INTERFACE_WRAP_HELPERS_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef WRAP_HELPERS_H
#define WRAP_HELPERS_H
@@ -329,6 +330,6 @@ static void registerQObject(QScriptEngine &engine)
scriptValueToQObject<SomeQObject>);
}
}
} // namespace SharedTools
#endif
#endif // WRAP_HELPERS_H

View File

@@ -51,7 +51,7 @@
# include <sys/resource.h>
#endif
enum { OptionIndent =4, DescriptionIndent = 24 };
enum { OptionIndent = 4, DescriptionIndent = 24 };
static const char *appNameC = "Qt Creator";
static const char *corePluginNameC = "Core";

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "aggregate.h"
#include <QtCore/QWriteLocker>
@@ -262,4 +263,3 @@ void Aggregate::remove(QObject *component)
m_components.removeAll(component);
disconnect(component, SIGNAL(destroyed(QObject*)), this, SLOT(deleteSelf(QObject*)));
}

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QAGGREGATION_H
#define QAGGREGATION_H
@@ -131,4 +132,4 @@ template <typename T> QList<T *> query_all(QObject *obj)
} // namespace Aggregation
#endif // header guard
#endif // QAGGREGATION_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef AGGREGATION_GLOBAL_H
#define AGGREGATION_GLOBAL_H
@@ -41,4 +42,4 @@
# define AGGREGATION_EXPORT Q_DECL_IMPORT
#endif
#endif // header
#endif // AGGREGATION_GLOBAL_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "main.h"
#include <QtGui/QApplication>
@@ -107,4 +108,3 @@ int main(int argc, char *argv[])
w.show();
return app.exec();
}

View File

@@ -30,15 +30,16 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef MAIN_H
#define MAIN_H
#include "myinterfaces.h"
#include "ui_main.h"
#include <aggregate.h>
#include <QtGui/QWidget>
#include "ui_main.h"
class MyMain : public QWidget
{

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef MYINTERFACES_H
#define MYINTERFACES_H
@@ -45,6 +46,7 @@ public:
IComboEntry(QString title) : m_title(title) {}
virtual ~IComboEntry() {}
QString title() const { return m_title; }
private:
QString m_title;
};
@@ -57,6 +59,7 @@ public:
IText1(QString text) : m_text(text) {}
virtual ~IText1() {}
QString text() const { return m_text; }
private:
QString m_text;
};
@@ -68,6 +71,7 @@ class IText2 : public QObject
public:
IText2(QString text) : m_text(text) {}
QString text() const { return m_text; }
private:
QString m_text;
};
@@ -80,6 +84,7 @@ public:
IText3(QString text) : m_text(text) {}
virtual ~IText3() {}
QString text() const { return m_text; }
private:
QString m_text;
};

View File

@@ -30,10 +30,11 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include <QtTest/QtTest>
#include <aggregate.h>
#include <QtTest/QtTest>
class tst_Aggregate : public QObject
{
Q_OBJECT
@@ -195,4 +196,5 @@ void tst_Aggregate::parentAggregate()
}
QTEST_MAIN(tst_Aggregate)
#include "tst_aggregate.moc"

View File

@@ -40,6 +40,7 @@
#include <Symbols.h>
#include <AST.h>
#include <Scope.h>
#include <QByteArray>
#include <QFile>
#include <QtDebug>
@@ -47,11 +48,12 @@
using namespace CPlusPlus;
namespace {
class DocumentDiagnosticClient: public DiagnosticClient
{
class DocumentDiagnosticClient : public DiagnosticClient
{
enum { MAX_MESSAGE_COUNT = 10 };
public:
public:
DocumentDiagnosticClient(Document *doc, QList<Document::DiagnosticMessage> *messages)
: doc(doc),
messages(messages)
@@ -89,8 +91,9 @@ namespace {
Document *doc;
QList<Document::DiagnosticMessage> *messages;
};
} // end of anonymous namespace
};
} // anonymous namespace
Document::Document(const QString &fileName)
: _fileName(fileName),
@@ -116,19 +119,29 @@ Document::~Document()
}
Control *Document::control() const
{ return _control; }
{
return _control;
}
QString Document::fileName() const
{ return _fileName; }
{
return _fileName;
}
QStringList Document::includedFiles() const
{ return _includedFiles; }
{
return _includedFiles;
}
void Document::addIncludeFile(const QString &fileName)
{ _includedFiles.append(fileName); }
{
_includedFiles.append(fileName);
}
QByteArray Document::definedMacros() const
{ return _definedMacros; }
{
return _definedMacros;
}
void Document::appendMacro(const QByteArray &macroName, const QByteArray &text)
{
@@ -141,13 +154,19 @@ void Document::appendMacro(const QByteArray &macroName, const QByteArray &text)
}
TranslationUnit *Document::translationUnit() const
{ return _translationUnit; }
{
return _translationUnit;
}
bool Document::skipFunctionBody() const
{ return _translationUnit->skipFunctionBody(); }
{
return _translationUnit->skipFunctionBody();
}
void Document::setSkipFunctionBody(bool skipFunctionBody)
{ _translationUnit->setSkipFunctionBody(skipFunctionBody); }
{
_translationUnit->setSkipFunctionBody(skipFunctionBody);
}
unsigned Document::globalSymbolCount() const
{
@@ -158,7 +177,9 @@ unsigned Document::globalSymbolCount() const
}
Symbol *Document::globalSymbolAt(unsigned index) const
{ return _globalNamespace->memberAt(index); }
{
return _globalNamespace->memberAt(index);
}
Scope *Document::globalSymbols() const
{
@@ -169,10 +190,14 @@ Scope *Document::globalSymbols() const
}
Namespace *Document::globalNamespace() const
{ return _globalNamespace; }
{
return _globalNamespace;
}
Symbol *Document::findSymbolAt(unsigned line, unsigned column) const
{ return findSymbolAt(line, column, globalSymbols()); }
{
return findSymbolAt(line, column, globalSymbols());
}
Symbol *Document::findSymbolAt(unsigned line, unsigned column, Scope *scope) const
{
@@ -203,10 +228,14 @@ Document::Ptr Document::create(const QString &fileName)
}
void Document::setSource(const QByteArray &source)
{ _translationUnit->setSource(source.constBegin(), source.size()); }
{
_translationUnit->setSource(source.constBegin(), source.size());
}
void Document::startSkippingBlocks(unsigned start)
{ _skippedBlocks.append(Block(start, 0)); }
{
_skippedBlocks.append(Block(start, 0));
}
void Document::stopSkippingBlocks(unsigned stop)
{
@@ -218,10 +247,14 @@ void Document::stopSkippingBlocks(unsigned stop)
}
QSet<QByteArray> Document::macroNames() const
{ return _macroNames; }
{
return _macroNames;
}
void Document::parse()
{ _translationUnit->parse(); }
{
_translationUnit->parse();
}
void Document::check()
{
@@ -239,4 +272,6 @@ void Document::check()
}
void Document::releaseTranslationUnit()
{ _translationUnit->release(); }
{
_translationUnit->release();
}

View File

@@ -30,16 +30,18 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CPPDOCUMENT_H
#define CPPDOCUMENT_H
#include <CPlusPlusForwardDeclarations.h>
#include <QByteArray>
#include <QList>
#include <QSet>
#include <QSharedPointer>
#include <QString>
#include <QStringList>
#include <QList>
#include <QSet>
namespace CPlusPlus {

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef EXPRESSIONUNDERCURSOR_H
#define EXPRESSIONUNDERCURSOR_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CPLUSPLUS_ICONS_H
#define CPLUSPLUS_ICONS_H

View File

@@ -39,6 +39,7 @@
#include <Scope.h>
#include <Control.h>
#include <cplusplus/Overview.h>
#include <QFile>
#include <QtDebug>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CPLUSPLUS_LOOKUPCONTEXT_H
#define CPLUSPLUS_LOOKUPCONTEXT_H
@@ -45,8 +46,7 @@ namespace CPlusPlus {
class CPLUSPLUS_EXPORT LookupUtils
{
public:
static bool isNameCompatibleWithIdentifier(Name *name,
Identifier *id);
static bool isNameCompatibleWithIdentifier(Name *name, Identifier *id);
};
class CPLUSPLUS_EXPORT LookupContext: LookupUtils

View File

@@ -44,6 +44,7 @@
#include <CoreTypes.h>
#include <TypeVisitor.h>
#include <NameVisitor.h>
#include <QList>
#include <QtDebug>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CPLUSPLUS_NAMEOFEXPRESSION_H
#define CPLUSPLUS_NAMEOFEXPRESSION_H

View File

@@ -30,7 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "NamePrettyPrinter.h"
#include <Names.h>
#include <Overview.h>
#include <NameVisitor.h>
@@ -46,7 +48,9 @@ NamePrettyPrinter::~NamePrettyPrinter()
{ }
const Overview *NamePrettyPrinter::overview() const
{ return _overview; }
{
return _overview;
}
QString NamePrettyPrinter::operator()(Name *name)
{

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CPLUSPLUS_NAMEPRETTYPRINTER_H
#define CPLUSPLUS_NAMEPRETTYPRINTER_H

View File

@@ -49,25 +49,39 @@ Overview::~Overview()
{ }
bool Overview::showArgumentNames() const
{ return _showArgumentNames; }
{
return _showArgumentNames;
}
void Overview::setShowArgumentNames(bool showArgumentNames)
{ _showArgumentNames = showArgumentNames; }
{
_showArgumentNames = showArgumentNames;
}
void Overview::setShowReturnTypes(bool showReturnTypes)
{ _showReturnTypes = showReturnTypes; }
{
_showReturnTypes = showReturnTypes;
}
bool Overview::showReturnTypes() const
{ return _showReturnTypes; }
{
return _showReturnTypes;
}
void Overview::setMarkArgument(unsigned position)
{ _markArgument = position; }
{
_markArgument = position;
}
bool Overview::showFunctionSignatures() const
{ return _showFunctionSignatures; }
{
return _showFunctionSignatures;
}
void Overview::setShowFunctionSignatures(bool showFunctionSignatures)
{ _showFunctionSignatures = showFunctionSignatures; }
{
_showFunctionSignatures = showFunctionSignatures;
}
QString Overview::prettyName(Name *name) const
{
@@ -75,9 +89,10 @@ QString Overview::prettyName(Name *name) const
return pp(name);
}
QString Overview::prettyType(const FullySpecifiedType &ty,
Name *name) const
{ return prettyType(ty, prettyName(name)); }
QString Overview::prettyType(const FullySpecifiedType &ty, Name *name) const
{
return prettyType(ty, prettyName(name));
}
QString Overview::prettyType(const FullySpecifiedType &ty,
const QString &name) const

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef OVERVIEW_H
#define OVERVIEW_H

View File

@@ -33,10 +33,12 @@
#include "OverviewModel.h"
#include "Overview.h"
#include <Scope.h>
#include <Semantic.h>
#include <Literals.h>
#include <Symbols.h>
#include <QFile>
#include <QtDebug>
@@ -50,10 +52,14 @@ OverviewModel::~OverviewModel()
{ }
bool OverviewModel::hasDocument() const
{ return _cppDocument; }
{
return _cppDocument;
}
Document::Ptr OverviewModel::document() const
{ return _cppDocument; }
{
return _cppDocument;
}
unsigned OverviewModel::globalSymbolCount() const
{
@@ -124,7 +130,9 @@ int OverviewModel::rowCount(const QModelIndex &parent) const
}
int OverviewModel::columnCount(const QModelIndex &) const
{ return 1; }
{
return 1;
}
QVariant OverviewModel::data(const QModelIndex &index, int role) const
{
@@ -174,7 +182,9 @@ QVariant OverviewModel::data(const QModelIndex &index, int role) const
}
Symbol *OverviewModel::symbolFromIndex(const QModelIndex &index) const
{ return static_cast<Symbol *>(index.internalPointer()); }
{
return static_cast<Symbol *>(index.internalPointer());
}
void OverviewModel::rebuild(Document::Ptr doc)
{

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CPLUSPLUS_OVERVIEWMODEL_H
#define CPLUSPLUS_OVERVIEWMODEL_H
@@ -42,7 +43,7 @@
namespace CPlusPlus {
class CPLUSPLUS_EXPORT OverviewModel: public QAbstractItemModel
class CPLUSPLUS_EXPORT OverviewModel : public QAbstractItemModel
{
Q_OBJECT

View File

@@ -44,6 +44,7 @@
#include <CoreTypes.h>
#include <TypeVisitor.h>
#include <NameVisitor.h>
#include <QList>
#include <QtDebug>

View File

@@ -30,10 +30,12 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CPLUSPLUS_RESOLVEEXPRESSION_H
#define CPLUSPLUS_RESOLVEEXPRESSION_H
#include "LookupContext.h"
#include <ASTVisitor.h>
#include <Semantic.h>
#include <FullySpecifiedType.h>

View File

@@ -32,6 +32,7 @@
***************************************************************************/
#include "SimpleLexer.h"
#include <Lexer.h>
#include <Token.h>
#include <QtDebug>
@@ -39,13 +40,19 @@
using namespace CPlusPlus;
bool SimpleToken::isLiteral() const
{ return _kind >= T_FIRST_LITERAL && _kind <= T_LAST_LITERAL; }
{
return _kind >= T_FIRST_LITERAL && _kind <= T_LAST_LITERAL;
}
bool SimpleToken::isOperator() const
{ return _kind >= T_FIRST_OPERATOR && _kind <= T_LAST_OPERATOR; }
{
return _kind >= T_FIRST_OPERATOR && _kind <= T_LAST_OPERATOR;
}
bool SimpleToken::isKeyword() const
{ return _kind >= T_FIRST_KEYWORD && _kind < T_FIRST_QT_KEYWORD; }
{
return _kind >= T_FIRST_KEYWORD && _kind < T_FIRST_QT_KEYWORD;
}
SimpleLexer::SimpleLexer()
: _lastState(0),
@@ -57,16 +64,24 @@ SimpleLexer::~SimpleLexer()
{ }
bool SimpleLexer::qtMocRunEnabled() const
{ return _qtMocRunEnabled; }
{
return _qtMocRunEnabled;
}
void SimpleLexer::setQtMocRunEnabled(bool enabled)
{ _qtMocRunEnabled = enabled; }
{
_qtMocRunEnabled = enabled;
}
bool SimpleLexer::skipComments() const
{ return _skipComments; }
{
return _skipComments;
}
void SimpleLexer::setSkipComments(bool skipComments)
{ _skipComments = skipComments; }
{
_skipComments = skipComments;
}
QList<SimpleToken> SimpleLexer::operator()(const QString &text, int state)
{

View File

@@ -34,6 +34,7 @@
#define SIMPLELEXER_H
#include <CPlusPlusForwardDeclarations.h>
#include <QString>
#include <QList>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef EXTENSIONSYSTEM_GLOBAL_H
#define EXTENSIONSYSTEM_GLOBAL_H
@@ -41,4 +42,4 @@
# define EXTENSIONSYSTEM_EXPORT Q_DECL_IMPORT
#endif
#endif // header
#endif // EXTENSIONSYSTEM_GLOBAL_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "iplugin.h"
#include "iplugin_p.h"
#include "pluginmanager.h"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef IPLUGIN_H
#define IPLUGIN_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef IPLUGIN_P_H
#define IPLUGIN_P_H
@@ -55,4 +56,4 @@ public:
} // namespace Internal
} // namespace ExtensionSystem
#endif // header guard
#endif // IPLUGIN_P_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "optionsparser.h"
#include <QtCore/QCoreApplication>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef OPTIONSPARSER_H
#define OPTIONSPARSER_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugindetailsview.h"
#include "ui_plugindetailsview.h"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINDETAILSVIEW_H_
#define PLUGINDETAILSVIEW_H_
@@ -38,8 +39,7 @@
#include <QtGui/QWidget>
namespace ExtensionSystem
{
namespace ExtensionSystem {
namespace Internal {
namespace Ui {

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "pluginerrorview.h"
#include "ui_pluginerrorview.h"

View File

@@ -30,16 +30,16 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINERRORVIEW_H_
#define PLUGINERRORVIEW_H_
#ifndef PLUGINERRORVIEW_H
#define PLUGINERRORVIEW_H
#include "extensionsystem_global.h"
#include "pluginspec.h"
#include <QtGui/QWidget>
namespace ExtensionSystem
{
namespace ExtensionSystem {
namespace Internal {
namespace Ui {
@@ -63,4 +63,4 @@ private:
} // namespace ExtensionSystem
#endif /*PLUGINERRORVIEW_H_*/
#endif // PLUGINERRORVIEW_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "pluginmanager.h"
#include "pluginmanager_p.h"
#include "pluginspec.h"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef EXTENSIONSYSTEM_PLUGINMANAGER_H
#define EXTENSIONSYSTEM_PLUGINMANAGER_H
@@ -133,6 +134,6 @@ private:
friend class Internal::PluginManagerPrivate;
};
} //namespace
} // namespace ExtensionSystem
#endif // PLUGINMANAGER_H
#endif // EXTENSIONSYSTEM_PLUGINMANAGER_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINMANAGER_P_H
#define PLUGINMANAGER_P_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "pluginspec.h"
#include "pluginspec.h"
#include "pluginspec_p.h"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINSPEC_H
#define PLUGINSPEC_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINSPEC_P_H
#define PLUGINSPEC_P_H
@@ -103,4 +104,4 @@ private:
} // namespace Internal
} // namespace ExtensionSystem
#endif // header guard
#endif // PLUGINSPEC_P_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "pluginview.h"
#include "pluginview_p.h"
#include "pluginmanager.h"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINVIEW_H
#define PLUGINVIEW_H
@@ -79,4 +80,4 @@ private:
} // namespae ExtensionSystem
#endif
#endif // PLUGIN_VIEW_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINVIEW_P_H
#define PLUGINVIEW_P_H
@@ -45,7 +46,7 @@ public:
PluginManager *manager;
};
} // namespace
} // namespace
} // namespace Internal
} // namespace ExtensionSystem
#endif
#endif PLUGINVIEW_P_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin1.h"
#include <QtCore/qplugin.h>
@@ -40,8 +41,10 @@ MyPlugin1::MyPlugin1()
{
}
bool MyPlugin1::initialize(const QStringList & /*arguments*/, QString *errorString)
bool MyPlugin1::initialize(const QStringList &arguments, QString *errorString)
{
Q_UNUSED(arguments);
Q_UNUSED(errorString);
return true;
}

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN1_H
#define PLUGIN1_H
@@ -50,6 +51,6 @@ public:
void extensionsInitialized();
};
} // namespace
} // namespace Plugin1
#endif // header guard
#endif // PLUGIN1_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin2.h"
#include <QtCore/qplugin.h>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN2_H
#define PLUGIN2_H
@@ -50,6 +51,6 @@ public:
void extensionsInitialized();
};
} // namespace
} // Plugin2
#endif // header guard
#endif // PLUGIN2_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN3_H
#define PLUGIN3_H
@@ -50,6 +51,6 @@ public:
void extensionsInitialized();
};
} // namespace
} // namespace Plugin3
#endif // header guard
#endif // PLUGIN3_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin1.h"
#include <extensionsystem/pluginmanager.h>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN1_H
#define PLUGIN1_H
@@ -53,6 +54,6 @@ private:
bool initializeCalled;
};
} // namespace
} // namespace Plugin1
#endif // header guard
#endif // PLUGIN1_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin2.h"
#include <extensionsystem/pluginmanager.h>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN2_H
#define PLUGIN2_H
@@ -53,6 +54,6 @@ private:
bool initializeCalled;
};
} // namespace
} // namespace Plugin2
#endif // header guard
#endif // PLUGIN2_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin3.h"
#include <extensionsystem/pluginmanager.h>
@@ -74,4 +75,3 @@ void MyPlugin3::extensionsInitialized()
}
Q_EXPORT_PLUGIN(MyPlugin3)

View File

@@ -53,6 +53,6 @@ private:
bool initializeCalled;
};
} // namespace
} // namespace Plugin3
#endif // header guard
#endif // PLUGIN3_H

View File

@@ -30,14 +30,15 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include <QtTest/QtTest>
#include <QtCore/QObject>
#include <extensionsystem/pluginmanager.h>
#include <extensionsystem/pluginspec.h>
#include <extensionsystem/iplugin.h>
#include <QtTest/QtTest>
#include <QtCore/QObject>
using namespace ExtensionSystem;
class SignalReceiver;
@@ -263,5 +264,6 @@ void tst_PluginManager::correctPlugins1()
}
QTEST_MAIN(tst_PluginManager)
#include "tst_pluginmanager.moc"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "testplugin.h"
#include <QtCore/qplugin.h>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef TESTPLUGIN_H
#define TESTPLUGIN_H
@@ -59,4 +60,4 @@ private:
} // namespace
#endif // header guard
#endif // TESTPLUGIN_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef TESTPLUGIN_GLOBAL_H
#define TESTPLUGIN_GLOBAL_H
@@ -41,4 +42,4 @@
# define MYPLUGIN_EXPORT Q_DECL_IMPORT
#endif
#endif // header
#endif // TESTPLUGIN_GLOBAL_H

View File

@@ -30,7 +30,6 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include <QtTest/QtTest>
#include "testplugin/testplugin.h"
@@ -40,6 +39,7 @@
#include <extensionsystem/pluginmanager.h>
#include <QtCore/QObject>
#include <QtTest/QtTest>
using namespace ExtensionSystem;
@@ -275,4 +275,5 @@ void tst_PluginSpec::initializeExtensions()
}
QTEST_MAIN(tst_PluginSpec)
#include "tst_pluginspec.moc"

View File

@@ -30,7 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugindialog.h"
#include <extensionsystem/plugindetailsview.h>
#include <extensionsystem/pluginerrorview.h>
#include <extensionsystem/pluginspec.h>
@@ -139,4 +141,3 @@ int main(int argc, char *argv[])
dialog.show();
app.exec();
}

View File

@@ -30,11 +30,13 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGINDIALOG_H
#define PLUGINDIALOG_H
#include <extensionsystem/pluginview.h>
#include <extensionsystem/pluginmanager.h>
#include <QtGui/QWidget>
#include <QtGui/QPushButton>
@@ -58,4 +60,4 @@ private:
QPushButton *m_errorDetailsButton;
};
#endif
#endif // PLUGINDIALOG_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin1.h"
#include <extensionsystem/pluginmanager.h>
@@ -83,4 +84,3 @@ void MyPlugin1::extensionsInitialized()
}
Q_EXPORT_PLUGIN(MyPlugin1)

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN1_H
#define PLUGIN1_H
@@ -54,6 +55,6 @@ private:
bool initializeCalled;
};
} // namespace
} // namespace Plugin1
#endif // header guard
#endif // PLUGIN1_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin2.h"
#include <extensionsystem/pluginmanager.h>
@@ -66,4 +67,3 @@ void MyPlugin2::extensionsInitialized()
}
Q_EXPORT_PLUGIN(MyPlugin2)

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN2_H
#define PLUGIN2_H
@@ -54,6 +55,6 @@ private:
bool initializeCalled;
};
} // namespace
} // namespace Plugin2
#endif // header guard
#endif // PLUGIN2_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "plugin3.h"
#include <extensionsystem/pluginmanager.h>
@@ -74,4 +75,3 @@ void MyPlugin3::extensionsInitialized()
}
Q_EXPORT_PLUGIN(MyPlugin3)

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef PLUGIN3_H
#define PLUGIN3_H
@@ -54,6 +55,6 @@ private:
bool initializeCalled;
};
} // namespace
} // namespace Plugin3
#endif // header guard
#endif // PLUGIN3_H

View File

@@ -30,11 +30,13 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef MULTITASK_H
#define MULTITASK_H
#include "qtconcurrent_global.h"
#include "runextensions.h"
#include <QtCore/QObject>
#include <QtCore/QList>
#include <QtCore/QEventLoop>
@@ -184,14 +186,15 @@ private:
};
template <typename Class, typename T>
QFuture<T> run(void (Class::*fn)(QFutureInterface<T> &), const QList<Class *> &objects, int priority = 0) {
QFuture<T> run(void (Class::*fn)(QFutureInterface<T> &), const QList<Class *> &objects, int priority = 0)
{
MultiTask<Class, T> *task = new MultiTask<Class, T>(fn, objects);
QFuture<T> future = task->future();
QThreadPool::globalInstance()->start(task, priority);
return future;
}
} //namespace
} // namespace QtConcurrent
QT_END_NAMESPACE

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QTCONCURRENT_GLOBAL_H
#define QTCONCURRENT_GLOBAL_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QTCONCURRENT_RUNEX_H
#define QTCONCURRENT_RUNEX_H
@@ -390,8 +391,8 @@ QFuture<T> run(void (Class::*fn)(QFutureInterface<T> &), Class *object)
return (new StoredInterfaceMemberFunctionCall0<T, void (Class::*)(QFutureInterface<T> &), Class>(fn, object))->start();
}
} //namespace QtConcurrent
} // namespace QtConcurrent
QT_END_NAMESPACE
#endif
#endif // QTCONCURRENT_RUNEX_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "basevalidatinglineedit.h"
#include <QtCore/QDebug>
@@ -153,5 +154,5 @@ void BaseValidatingLineEdit::slotReturnPressed()
emit validReturnPressed();
}
}
}
} // namespace Utils
} // namespace Core

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef BASEVALIDATINGLINEEDIT_H
#define BASEVALIDATINGLINEEDIT_H
@@ -95,6 +96,6 @@ private:
BaseValidatingLineEditPrivate *m_bd;
};
}
}
} // namespace Utils
} // namespace Core
#endif // BASEVALIDATINGLINEEDIT_H

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "classnamevalidatinglineedit.h"
#include <QtCore/QDebug>
@@ -133,5 +134,5 @@ QString ClassNameValidatingLineEdit::createClassName(const QString &name)
return className;
}
}
}
} // namespace Utils
} // namespace Core

Some files were not shown because too many files have changed in this diff Show More