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

View File

@@ -30,8 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 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" #include "namespace_global.h"
@@ -62,8 +63,6 @@ struct Prefix;
*/ */
class Node class Node
{ {
File *m_file;
Prefix *m_prefix;
protected: protected:
Node(File *file, Prefix *prefix) : m_file(file), m_prefix(prefix) Node(File *file, Prefix *prefix) : m_file(file), m_prefix(prefix)
{ {
@@ -72,6 +71,9 @@ protected:
public: public:
File * file() { return m_file; } File * file() { return m_file; }
Prefix * prefix() { Q_ASSERT(m_prefix != NULL); return m_prefix; } 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. 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()) 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) {} : Node(NULL, this), name(_name), lang(_lang), file_list(_file_list) {}
~Prefix() ~Prefix()
@@ -263,4 +266,4 @@ private:
QT_END_NAMESPACE 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "resourceview.h" #include "resourceview.h"
#include "undocommands_p.h" #include "undocommands_p.h"
@@ -658,4 +659,4 @@ bool ResourceView::resourceDragEnabled() const
return m_qrcModel->resourceDragEnabled(); return m_qrcModel->resourceDragEnabled();
} }
} } // namespace SharedTools

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef RESOURCEVIEW_H #ifndef RESOURCEVIEW_H
#define RESOURCEVIEW_H #define RESOURCEVIEW_H
@@ -42,10 +43,12 @@
using namespace qdesigner_internal; using namespace qdesigner_internal;
QT_FORWARD_DECLARE_CLASS(QAction) QT_BEGIN_NAMESPACE
QT_FORWARD_DECLARE_CLASS(QMenu) class QAction;
QT_FORWARD_DECLARE_CLASS(QMouseEvent) class QMenu;
QT_FORWARD_DECLARE_CLASS(QUndoStack) class QMouseEvent;
class QUndoStack;
QT_END_NAMESPACE
namespace SharedTools { namespace SharedTools {
@@ -178,6 +181,6 @@ private:
int m_mergeId; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "qrceditor.h" #include "qrceditor.h"
#include "mainwindow.h" #include "mainwindow.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc,argv); QApplication app(argc, argv);
MainWindow mw; MainWindow mw;
mw.show(); mw.show();
return app.exec(); return app.exec();

View File

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

View File

@@ -30,8 +30,9 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef _MAINWINDOW_
#define _MAINWINDOW_ #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow> #include <QMainWindow>
@@ -39,7 +40,8 @@ namespace SharedTools {
class QrcEditor; class QrcEditor;
} }
class MainWindow : public QMainWindow { class MainWindow : public QMainWindow
{
Q_OBJECT Q_OBJECT
public: public:
@@ -51,6 +53,6 @@ private slots:
private: private:
SharedTools::QrcEditor *m_qrcEditor; 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. ** 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" #include "undocommands_p.h"
@@ -104,7 +92,7 @@ bool ModifyPropertyCommand::mergeWith(const QUndoCommand * command)
{ {
const ModifyPropertyCommand * const brother const ModifyPropertyCommand * const brother
= dynamic_cast<const ModifyPropertyCommand *>(command); = dynamic_cast<const ModifyPropertyCommand *>(command);
if ((command == NULL) || (m_property != brother->m_property)) if (command == NULL || m_property != brother->m_property)
return false; return false;
// Choose older command (this) and forgot the other // Choose older command (this) and forgot the other
@@ -125,9 +113,8 @@ void ModifyPropertyCommand::undo()
void ModifyPropertyCommand::redo() void ModifyPropertyCommand::redo()
{ {
// Prevent execution from within QUndoStack::push // Prevent execution from within QUndoStack::push
if (m_after.isNull()) { if (m_after.isNull())
return; return;
}
// Bring back text before undo // Bring back text before undo
Q_ASSERT(m_view != NULL); Q_ASSERT(m_view != NULL);

View File

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

View File

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

View File

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

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "qtlockedfile.h" #include "qtlockedfile.h"
namespace SharedTools { namespace SharedTools {
@@ -158,4 +159,4 @@ QtLockedFile::LockMode QtLockedFile::lockMode() const
Destroys the \e QtLockedFile object. If any locks were held, they are released. 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef QTLOCKEDFILE_H #ifndef QTLOCKEDFILE_H
#define QTLOCKEDFILE_H #define QTLOCKEDFILE_H
@@ -75,6 +76,6 @@ private:
LockMode m_lock_mode; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "qtlockedfile.h"
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include "qtlockedfile.h"
namespace SharedTools { namespace SharedTools {
bool QtLockedFile::lock(LockMode mode, bool block) bool QtLockedFile::lock(LockMode mode, bool block)
@@ -107,4 +108,4 @@ QtLockedFile::~QtLockedFile()
unlock(); unlock();
} }
} } // namespace SharedTools

View File

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

View File

@@ -32,6 +32,7 @@
***************************************************************************/ ***************************************************************************/
#include "qtlocalpeer.h" #include "qtlocalpeer.h"
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#include <QtCore/QTime> #include <QtCore/QTime>
@@ -176,4 +177,4 @@ void QtLocalPeer::receiveConnection()
emit messageReceived(message); // ##(might take a long time to return) 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/QLocalServer>
#include <QtNetwork/QLocalSocket> #include <QtNetwork/QLocalSocket>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <qtlockedfile.h>
namespace SharedTools { namespace SharedTools {
@@ -66,4 +66,4 @@ private:
static const char* ack; static const char* ack;
}; };
} // SharedTools } // namespace SharedTools

View File

@@ -33,6 +33,7 @@
#include "qtsingleapplication.h" #include "qtsingleapplication.h"
#include "qtlocalpeer.h" #include "qtlocalpeer.h"
#include <QtGui/QWidget> #include <QtGui/QWidget>
#include <QtGui/QFileOpenEvent> #include <QtGui/QFileOpenEvent>
@@ -80,7 +81,8 @@ QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Q
sysInit(); 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) : QApplication(dpy, argc, argv, visual, colormap)
{ {
sysInit(appId); 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; actWin = aw;
if (activateOnMessage) if (activateOnMessage)
connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); connect(peer, SIGNAL(messageReceived(QString)), this, SLOT(activateWindow()));
else 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; QWidget *actWin;
}; };
} } // namespace SharedTools

View File

@@ -40,7 +40,7 @@ QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv)
: QCoreApplication(argc, argv) : QCoreApplication(argc, argv)
{ {
peer = new QtLocalPeer(this); 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) : QCoreApplication(argc, argv)
{ {
peer = new QtLocalPeer(this, appId); 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(); return peer->applicationId();
} }
} } // namespace SharedTools

View File

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

View File

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

View File

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

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "aggregate.h" #include "aggregate.h"
#include <QtCore/QWriteLocker> #include <QtCore/QWriteLocker>
@@ -262,4 +263,3 @@ void Aggregate::remove(QObject *component)
m_components.removeAll(component); m_components.removeAll(component);
disconnect(component, SIGNAL(destroyed(QObject*)), this, SLOT(deleteSelf(QObject*))); 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef QAGGREGATION_H #ifndef QAGGREGATION_H
#define QAGGREGATION_H #define QAGGREGATION_H
@@ -131,4 +132,4 @@ template <typename T> QList<T *> query_all(QObject *obj)
} // namespace Aggregation } // 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef AGGREGATION_GLOBAL_H #ifndef AGGREGATION_GLOBAL_H
#define AGGREGATION_GLOBAL_H #define AGGREGATION_GLOBAL_H
@@ -41,4 +42,4 @@
# define AGGREGATION_EXPORT Q_DECL_IMPORT # define AGGREGATION_EXPORT Q_DECL_IMPORT
#endif #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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "main.h" #include "main.h"
#include <QtGui/QApplication> #include <QtGui/QApplication>
@@ -107,4 +108,3 @@ int main(int argc, char *argv[])
w.show(); w.show();
return app.exec(); return app.exec();
} }

View File

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

View File

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

View File

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

View File

@@ -40,6 +40,7 @@
#include <Symbols.h> #include <Symbols.h>
#include <AST.h> #include <AST.h>
#include <Scope.h> #include <Scope.h>
#include <QByteArray> #include <QByteArray>
#include <QFile> #include <QFile>
#include <QtDebug> #include <QtDebug>
@@ -47,50 +48,52 @@
using namespace CPlusPlus; using namespace CPlusPlus;
namespace { namespace {
class DocumentDiagnosticClient: public DiagnosticClient
class DocumentDiagnosticClient : public DiagnosticClient
{
enum { MAX_MESSAGE_COUNT = 10 };
public:
DocumentDiagnosticClient(Document *doc, QList<Document::DiagnosticMessage> *messages)
: doc(doc),
messages(messages)
{ }
virtual void report(int level,
StringLiteral *fileId,
unsigned line, unsigned column,
const char *format, va_list ap)
{ {
enum { MAX_MESSAGE_COUNT = 10 }; if (messages->count() == MAX_MESSAGE_COUNT)
return;
public: const QString fileName = QString::fromUtf8(fileId->chars(), fileId->size());
DocumentDiagnosticClient(Document *doc, QList<Document::DiagnosticMessage> *messages)
: doc(doc),
messages(messages)
{ }
virtual void report(int level, if (fileName != doc->fileName())
StringLiteral *fileId, return;
unsigned line, unsigned column,
const char *format, va_list ap)
{
if (messages->count() == MAX_MESSAGE_COUNT)
return;
const QString fileName = QString::fromUtf8(fileId->chars(), fileId->size()); QString message;
message.vsprintf(format, ap);
if (fileName != doc->fileName()) Document::DiagnosticMessage m(convertLevel(level), doc->fileName(),
return; line, column, message);
messages->append(m);
}
QString message; static int convertLevel(int level) {
message.vsprintf(format, ap); switch (level) {
case Warning: return Document::DiagnosticMessage::Warning;
Document::DiagnosticMessage m(convertLevel(level), doc->fileName(), case Error: return Document::DiagnosticMessage::Error;
line, column, message); case Fatal: return Document::DiagnosticMessage::Fatal;
messages->append(m); default: return Document::DiagnosticMessage::Error;
} }
}
static int convertLevel(int level) { Document *doc;
switch (level) { QList<Document::DiagnosticMessage> *messages;
case Warning: return Document::DiagnosticMessage::Warning; };
case Error: return Document::DiagnosticMessage::Error;
case Fatal: return Document::DiagnosticMessage::Fatal;
default: return Document::DiagnosticMessage::Error;
}
}
Document *doc; } // anonymous namespace
QList<Document::DiagnosticMessage> *messages;
};
} // end of anonymous namespace
Document::Document(const QString &fileName) Document::Document(const QString &fileName)
: _fileName(fileName), : _fileName(fileName),
@@ -116,19 +119,29 @@ Document::~Document()
} }
Control *Document::control() const Control *Document::control() const
{ return _control; } {
return _control;
}
QString Document::fileName() const QString Document::fileName() const
{ return _fileName; } {
return _fileName;
}
QStringList Document::includedFiles() const QStringList Document::includedFiles() const
{ return _includedFiles; } {
return _includedFiles;
}
void Document::addIncludeFile(const QString &fileName) void Document::addIncludeFile(const QString &fileName)
{ _includedFiles.append(fileName); } {
_includedFiles.append(fileName);
}
QByteArray Document::definedMacros() const QByteArray Document::definedMacros() const
{ return _definedMacros; } {
return _definedMacros;
}
void Document::appendMacro(const QByteArray &macroName, const QByteArray &text) 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 TranslationUnit *Document::translationUnit() const
{ return _translationUnit; } {
return _translationUnit;
}
bool Document::skipFunctionBody() const bool Document::skipFunctionBody() const
{ return _translationUnit->skipFunctionBody(); } {
return _translationUnit->skipFunctionBody();
}
void Document::setSkipFunctionBody(bool skipFunctionBody) void Document::setSkipFunctionBody(bool skipFunctionBody)
{ _translationUnit->setSkipFunctionBody(skipFunctionBody); } {
_translationUnit->setSkipFunctionBody(skipFunctionBody);
}
unsigned Document::globalSymbolCount() const unsigned Document::globalSymbolCount() const
{ {
@@ -158,7 +177,9 @@ unsigned Document::globalSymbolCount() const
} }
Symbol *Document::globalSymbolAt(unsigned index) const Symbol *Document::globalSymbolAt(unsigned index) const
{ return _globalNamespace->memberAt(index); } {
return _globalNamespace->memberAt(index);
}
Scope *Document::globalSymbols() const Scope *Document::globalSymbols() const
{ {
@@ -169,10 +190,14 @@ Scope *Document::globalSymbols() const
} }
Namespace *Document::globalNamespace() const Namespace *Document::globalNamespace() const
{ return _globalNamespace; } {
return _globalNamespace;
}
Symbol *Document::findSymbolAt(unsigned line, unsigned column) const 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 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) void Document::setSource(const QByteArray &source)
{ _translationUnit->setSource(source.constBegin(), source.size()); } {
_translationUnit->setSource(source.constBegin(), source.size());
}
void Document::startSkippingBlocks(unsigned start) void Document::startSkippingBlocks(unsigned start)
{ _skippedBlocks.append(Block(start, 0)); } {
_skippedBlocks.append(Block(start, 0));
}
void Document::stopSkippingBlocks(unsigned stop) void Document::stopSkippingBlocks(unsigned stop)
{ {
@@ -218,10 +247,14 @@ void Document::stopSkippingBlocks(unsigned stop)
} }
QSet<QByteArray> Document::macroNames() const QSet<QByteArray> Document::macroNames() const
{ return _macroNames; } {
return _macroNames;
}
void Document::parse() void Document::parse()
{ _translationUnit->parse(); } {
_translationUnit->parse();
}
void Document::check() void Document::check()
{ {
@@ -239,4 +272,6 @@ void Document::check()
} }
void Document::releaseTranslationUnit() 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef CPPDOCUMENT_H #ifndef CPPDOCUMENT_H
#define CPPDOCUMENT_H #define CPPDOCUMENT_H
#include <CPlusPlusForwardDeclarations.h> #include <CPlusPlusForwardDeclarations.h>
#include <QByteArray> #include <QByteArray>
#include <QList>
#include <QSet>
#include <QSharedPointer> #include <QSharedPointer>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QList>
#include <QSet>
namespace CPlusPlus { namespace CPlusPlus {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef EXTENSIONSYSTEM_GLOBAL_H #ifndef EXTENSIONSYSTEM_GLOBAL_H
#define EXTENSIONSYSTEM_GLOBAL_H #define EXTENSIONSYSTEM_GLOBAL_H
@@ -41,4 +42,4 @@
# define EXTENSIONSYSTEM_EXPORT Q_DECL_IMPORT # define EXTENSIONSYSTEM_EXPORT Q_DECL_IMPORT
#endif #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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "iplugin.h" #include "iplugin.h"
#include "iplugin_p.h" #include "iplugin_p.h"
#include "pluginmanager.h" #include "pluginmanager.h"

View File

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

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef IPLUGIN_P_H #ifndef IPLUGIN_P_H
#define IPLUGIN_P_H #define IPLUGIN_P_H
@@ -55,4 +56,4 @@ public:
} // namespace Internal } // namespace Internal
} // namespace ExtensionSystem } // 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "optionsparser.h" #include "optionsparser.h"
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>

View File

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

View File

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

View File

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

View File

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

View File

@@ -30,16 +30,16 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 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 "extensionsystem_global.h"
#include "pluginspec.h" #include "pluginspec.h"
#include <QtGui/QWidget> #include <QtGui/QWidget>
namespace ExtensionSystem namespace ExtensionSystem {
{
namespace Internal { namespace Internal {
namespace Ui { namespace Ui {
@@ -63,4 +63,4 @@ private:
} // namespace ExtensionSystem } // 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "pluginmanager.h" #include "pluginmanager.h"
#include "pluginmanager_p.h" #include "pluginmanager_p.h"
#include "pluginspec.h" #include "pluginspec.h"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef EXTENSIONSYSTEM_PLUGINMANAGER_H #ifndef EXTENSIONSYSTEM_PLUGINMANAGER_H
#define EXTENSIONSYSTEM_PLUGINMANAGER_H #define EXTENSIONSYSTEM_PLUGINMANAGER_H
@@ -133,6 +134,6 @@ private:
friend class Internal::PluginManagerPrivate; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGINMANAGER_P_H #ifndef PLUGINMANAGER_P_H
#define 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "pluginspec.h" #include "pluginspec.h"
#include "pluginspec.h" #include "pluginspec.h"
#include "pluginspec_p.h" #include "pluginspec_p.h"

View File

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

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGINSPEC_P_H #ifndef PLUGINSPEC_P_H
#define PLUGINSPEC_P_H #define PLUGINSPEC_P_H
@@ -103,4 +104,4 @@ private:
} // namespace Internal } // namespace Internal
} // namespace ExtensionSystem } // 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "pluginview.h" #include "pluginview.h"
#include "pluginview_p.h" #include "pluginview_p.h"
#include "pluginmanager.h" #include "pluginmanager.h"

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGINVIEW_H #ifndef PLUGINVIEW_H
#define PLUGINVIEW_H #define PLUGINVIEW_H
@@ -79,4 +80,4 @@ private:
} // namespae ExtensionSystem } // 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGINVIEW_P_H #ifndef PLUGINVIEW_P_H
#define PLUGINVIEW_P_H #define PLUGINVIEW_P_H
@@ -45,7 +46,7 @@ public:
PluginManager *manager; PluginManager *manager;
}; };
} // namespace } // namespace Internal
} // namespace } // 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin1.h" #include "plugin1.h"
#include <QtCore/qplugin.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; return true;
} }

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGIN1_H #ifndef PLUGIN1_H
#define PLUGIN1_H #define PLUGIN1_H
@@ -50,6 +51,6 @@ public:
void extensionsInitialized(); 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin2.h" #include "plugin2.h"
#include <QtCore/qplugin.h> #include <QtCore/qplugin.h>

View File

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

View File

@@ -28,8 +28,9 @@
** In addition, as a special exception, Nokia gives you certain additional ** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt GPL Exception version ** rights. These rights are described in the Nokia Qt GPL Exception version
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin1.h" #include "plugin1.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGIN1_H #ifndef PLUGIN1_H
#define PLUGIN1_H #define PLUGIN1_H
@@ -53,6 +54,6 @@ private:
bool initializeCalled; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin2.h" #include "plugin2.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGIN2_H #ifndef PLUGIN2_H
#define PLUGIN2_H #define PLUGIN2_H
@@ -53,6 +54,6 @@ private:
bool initializeCalled; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin3.h" #include "plugin3.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
@@ -74,4 +75,3 @@ void MyPlugin3::extensionsInitialized()
} }
Q_EXPORT_PLUGIN(MyPlugin3) Q_EXPORT_PLUGIN(MyPlugin3)

View File

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

View File

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

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef TESTPLUGIN_H #ifndef TESTPLUGIN_H
#define TESTPLUGIN_H #define TESTPLUGIN_H
@@ -59,4 +60,4 @@ private:
} // namespace } // 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef TESTPLUGIN_GLOBAL_H #ifndef TESTPLUGIN_GLOBAL_H
#define TESTPLUGIN_GLOBAL_H #define TESTPLUGIN_GLOBAL_H
@@ -41,4 +42,4 @@
# define MYPLUGIN_EXPORT Q_DECL_IMPORT # define MYPLUGIN_EXPORT Q_DECL_IMPORT
#endif #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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include <QtTest/QtTest>
#include "testplugin/testplugin.h" #include "testplugin/testplugin.h"
@@ -40,6 +39,7 @@
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtTest/QtTest>
using namespace ExtensionSystem; using namespace ExtensionSystem;
@@ -275,4 +275,5 @@ void tst_PluginSpec::initializeExtensions()
} }
QTEST_MAIN(tst_PluginSpec) QTEST_MAIN(tst_PluginSpec)
#include "tst_pluginspec.moc" #include "tst_pluginspec.moc"

View File

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

View File

@@ -30,11 +30,13 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGINDIALOG_H #ifndef PLUGINDIALOG_H
#define PLUGINDIALOG_H #define PLUGINDIALOG_H
#include <extensionsystem/pluginview.h> #include <extensionsystem/pluginview.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <QtGui/QWidget> #include <QtGui/QWidget>
#include <QtGui/QPushButton> #include <QtGui/QPushButton>
@@ -58,4 +60,4 @@ private:
QPushButton *m_errorDetailsButton; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin1.h" #include "plugin1.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
@@ -83,4 +84,3 @@ void MyPlugin1::extensionsInitialized()
} }
Q_EXPORT_PLUGIN(MyPlugin1) Q_EXPORT_PLUGIN(MyPlugin1)

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGIN1_H #ifndef PLUGIN1_H
#define PLUGIN1_H #define PLUGIN1_H
@@ -54,6 +55,6 @@ private:
bool initializeCalled; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin2.h" #include "plugin2.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
@@ -66,4 +67,3 @@ void MyPlugin2::extensionsInitialized()
} }
Q_EXPORT_PLUGIN(MyPlugin2) Q_EXPORT_PLUGIN(MyPlugin2)

View File

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

View File

@@ -28,8 +28,9 @@
** In addition, as a special exception, Nokia gives you certain additional ** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt GPL Exception version ** rights. These rights are described in the Nokia Qt GPL Exception version
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "plugin3.h" #include "plugin3.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
@@ -74,4 +75,3 @@ void MyPlugin3::extensionsInitialized()
} }
Q_EXPORT_PLUGIN(MyPlugin3) Q_EXPORT_PLUGIN(MyPlugin3)

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef PLUGIN3_H #ifndef PLUGIN3_H
#define PLUGIN3_H #define PLUGIN3_H
@@ -54,6 +55,6 @@ private:
bool initializeCalled; 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef MULTITASK_H #ifndef MULTITASK_H
#define MULTITASK_H #define MULTITASK_H
#include "qtconcurrent_global.h" #include "qtconcurrent_global.h"
#include "runextensions.h" #include "runextensions.h"
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QEventLoop> #include <QtCore/QEventLoop>
@@ -184,14 +186,15 @@ private:
}; };
template <typename Class, typename T> 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); MultiTask<Class, T> *task = new MultiTask<Class, T>(fn, objects);
QFuture<T> future = task->future(); QFuture<T> future = task->future();
QThreadPool::globalInstance()->start(task, priority); QThreadPool::globalInstance()->start(task, priority);
return future; return future;
} }
} //namespace } // namespace QtConcurrent
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@@ -30,6 +30,7 @@
** 1.2, included in the file GPL_EXCEPTION.txt in this package. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef QTCONCURRENT_GLOBAL_H #ifndef QTCONCURRENT_GLOBAL_H
#define 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#ifndef QTCONCURRENT_RUNEX_H #ifndef QTCONCURRENT_RUNEX_H
#define 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(); return (new StoredInterfaceMemberFunctionCall0<T, void (Class::*)(QFutureInterface<T> &), Class>(fn, object))->start();
} }
} //namespace QtConcurrent } // namespace QtConcurrent
QT_END_NAMESPACE 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. ** 1.2, included in the file GPL_EXCEPTION.txt in this package.
** **
***************************************************************************/ ***************************************************************************/
#include "basevalidatinglineedit.h" #include "basevalidatinglineedit.h"
#include <QtCore/QDebug> #include <QtCore/QDebug>
@@ -153,5 +154,5 @@ void BaseValidatingLineEdit::slotReturnPressed()
emit validReturnPressed(); emit validReturnPressed();
} }
} } // namespace Utils
} } // namespace Core

View File

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

View File

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

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