forked from qt-creator/qt-creator
more cosmetic changes
This commit is contained in:
@@ -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 {
|
||||
|
||||
/******************************************************************************
|
||||
@@ -977,6 +978,7 @@ QMimeData *ResourceModel::mimeData(const QModelIndexList & indexes) const
|
||||
rc->setText(doc.toString());
|
||||
return rc;
|
||||
}
|
||||
|
||||
} // namespace qdesigner_internal
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "qrceditor.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
@@ -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())
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "qscripthighlighter.h"
|
||||
|
||||
#include <QtCore/QSet>
|
||||
@@ -438,11 +439,10 @@ 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
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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>
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QTEXTENDED_INTEGRATION
|
||||
#define QTEXTENDED_INTEGRATION
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
@@ -119,9 +121,9 @@ void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessag
|
||||
{
|
||||
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
|
||||
|
@@ -82,4 +82,4 @@ private:
|
||||
QWidget *actWin;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace SharedTools
|
||||
|
@@ -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
|
||||
|
@@ -60,4 +60,4 @@ private:
|
||||
QtLocalPeer* peer;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace SharedTools
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef INTERFACE_WRAP_HELPERS_H
|
||||
#define INTERFACE_WRAP_HELPERS_H
|
||||
|
||||
@@ -87,6 +88,6 @@ static void registerQObjectInterface(QScriptEngine &engine)
|
||||
Q_UNUSED(metaTypeId);
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace SharedTools
|
||||
|
||||
#endif
|
||||
#endif // INTERFACE_WRAP_HELPERS_H
|
||||
|
@@ -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
|
||||
|
@@ -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*)));
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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;
|
||||
};
|
||||
|
@@ -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"
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <Symbols.h>
|
||||
#include <AST.h>
|
||||
#include <Scope.h>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QFile>
|
||||
#include <QtDebug>
|
||||
@@ -47,6 +48,7 @@
|
||||
using namespace CPlusPlus;
|
||||
|
||||
namespace {
|
||||
|
||||
class DocumentDiagnosticClient : public DiagnosticClient
|
||||
{
|
||||
enum { MAX_MESSAGE_COUNT = 10 };
|
||||
@@ -90,7 +92,8 @@ 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 ¯oName, const QByteArray &text)
|
||||
{
|
||||
@@ -141,13 +154,19 @@ void Document::appendMacro(const QByteArray ¯oName, 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();
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef EXPRESSIONUNDERCURSOR_H
|
||||
#define EXPRESSIONUNDERCURSOR_H
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CPLUSPLUS_ICONS_H
|
||||
#define CPLUSPLUS_ICONS_H
|
||||
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include <Scope.h>
|
||||
#include <Control.h>
|
||||
#include <cplusplus/Overview.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QtDebug>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include <CoreTypes.h>
|
||||
#include <TypeVisitor.h>
|
||||
#include <NameVisitor.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QtDebug>
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CPLUSPLUS_NAMEOFEXPRESSION_H
|
||||
#define CPLUSPLUS_NAMEOFEXPRESSION_H
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CPLUSPLUS_NAMEPRETTYPRINTER_H
|
||||
#define CPLUSPLUS_NAMEPRETTYPRINTER_H
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef OVERVIEW_H
|
||||
#define OVERVIEW_H
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CPLUSPLUS_OVERVIEWMODEL_H
|
||||
#define CPLUSPLUS_OVERVIEWMODEL_H
|
||||
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include <CoreTypes.h>
|
||||
#include <TypeVisitor.h>
|
||||
#include <NameVisitor.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QtDebug>
|
||||
|
||||
|
@@ -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>
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#define SIMPLELEXER_H
|
||||
|
||||
#include <CPlusPlusForwardDeclarations.h>
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IPLUGIN_H
|
||||
#define IPLUGIN_H
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "optionsparser.h"
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef OPTIONSPARSER_H
|
||||
#define OPTIONSPARSER_H
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "plugindetailsview.h"
|
||||
#include "ui_plugindetailsview.h"
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "pluginerrorview.h"
|
||||
#include "ui_pluginerrorview.h"
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef PLUGINMANAGER_P_H
|
||||
#define PLUGINMANAGER_P_H
|
||||
|
||||
|
@@ -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"
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef PLUGINSPEC_H
|
||||
#define PLUGINSPEC_H
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "plugin2.h"
|
||||
|
||||
#include <QtCore/qplugin.h>
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "plugin1.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "plugin2.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -53,6 +53,6 @@ private:
|
||||
bool initializeCalled;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace Plugin3
|
||||
|
||||
#endif // header guard
|
||||
#endif // PLUGIN3_H
|
||||
|
@@ -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"
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "testplugin.h"
|
||||
|
||||
#include <QtCore/qplugin.h>
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QTCONCURRENT_GLOBAL_H
|
||||
#define QTCONCURRENT_GLOBAL_H
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QTCONCURRENT_RUNEX_H
|
||||
#define QTCONCURRENT_RUNEX_H
|
||||
|
||||
@@ -394,4 +395,4 @@ QFuture<T> run(void (Class::*fn)(QFutureInterface<T> &), Class *object)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
#endif // QTCONCURRENT_RUNEX_H
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -30,6 +30,7 @@
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CLASSNAMEVALIDATINGLINEEDIT_H
|
||||
#define CLASSNAMEVALIDATINGLINEEDIT_H
|
||||
|
||||
@@ -44,8 +45,9 @@ struct ClassNameValidatingLineEditPrivate;
|
||||
/* A Line edit that validates a C++ class name and emits a signal
|
||||
* to derive suggested file names from it. */
|
||||
|
||||
class QWORKBENCH_UTILS_EXPORT ClassNameValidatingLineEdit :
|
||||
public Core::Utils::BaseValidatingLineEdit {
|
||||
class QWORKBENCH_UTILS_EXPORT ClassNameValidatingLineEdit
|
||||
: public Core::Utils::BaseValidatingLineEdit
|
||||
{
|
||||
Q_DISABLE_COPY(ClassNameValidatingLineEdit)
|
||||
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
|
||||
Q_OBJECT
|
||||
@@ -73,7 +75,7 @@ private:
|
||||
ClassNameValidatingLineEditPrivate *m_d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace Utils
|
||||
} // namespace Core
|
||||
|
||||
#endif // CLASSNAMEVALIDATINGLINEEDIT_H
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user