forked from qt-creator/qt-creator
some more ICore related cleanup
This commit is contained in:
@@ -85,18 +85,17 @@ using namespace Core::Internal;
|
||||
static const char *settingsGroup = "RecentFiles";
|
||||
static const char *filesKey = "Files";
|
||||
|
||||
FileManager::FileManager(Core::ICore *core, MainWindow *mw) :
|
||||
QObject(mw),
|
||||
m_core(core),
|
||||
FileManager::FileManager(MainWindow *mw)
|
||||
: QObject(mw),
|
||||
m_mainWindow(mw),
|
||||
m_fileWatcher(new QFileSystemWatcher(this)),
|
||||
m_blockActivated(false)
|
||||
{
|
||||
connect(m_fileWatcher, SIGNAL(fileChanged(const QString&)),
|
||||
this, SLOT(changedFile(const QString&)));
|
||||
connect(m_fileWatcher, SIGNAL(fileChanged(QString)),
|
||||
this, SLOT(changedFile(QString)));
|
||||
connect(m_mainWindow, SIGNAL(windowActivated()),
|
||||
this, SLOT(mainWindowActivated()));
|
||||
connect(m_core, SIGNAL(contextChanged(Core::IContext*)),
|
||||
connect(Core::ICore::instance(), SIGNAL(contextChanged(Core::IContext*)),
|
||||
this, SLOT(syncWithEditor(Core::IContext*)));
|
||||
|
||||
QSettings *s = m_mainWindow->settings();
|
||||
@@ -440,7 +439,7 @@ QString FileManager::getSaveAsFileName(IFile *file)
|
||||
}
|
||||
QString filterString;
|
||||
QString preferredSuffix;
|
||||
if (const MimeType mt = m_core->mimeDatabase()->findByFile(fi)) {
|
||||
if (const MimeType mt = Core::ICore::instance()->mimeDatabase()->findByFile(fi)) {
|
||||
filterString = mt.filterString();
|
||||
preferredSuffix = mt.preferredSuffix();
|
||||
}
|
||||
@@ -510,7 +509,7 @@ void FileManager::syncWithEditor(Core::IContext *context)
|
||||
if (!context)
|
||||
return;
|
||||
|
||||
Core::IEditor *editor = m_core->editorManager()->currentEditor();
|
||||
Core::IEditor *editor = Core::ICore::instance()->editorManager()->currentEditor();
|
||||
if (editor && (editor->widget() == context->widget()))
|
||||
setCurrentFile(editor->file()->fileName());
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class CORE_EXPORT FileManager : public QObject
|
||||
};
|
||||
|
||||
public:
|
||||
FileManager(Core::ICore *core, Internal::MainWindow *ew);
|
||||
explicit FileManager(Internal::MainWindow *ew);
|
||||
|
||||
// file pool to monitor
|
||||
bool addFiles(const QList<IFile *> &files);
|
||||
@@ -99,10 +99,9 @@ public:
|
||||
QString getSaveAsFileName(IFile *file);
|
||||
|
||||
QList<IFile *> saveModifiedFilesSilently(const QList<IFile *> &files);
|
||||
QList<IFile *> saveModifiedFiles(
|
||||
const QList<IFile *> &files,
|
||||
bool *cancelled = 0,
|
||||
const QString &message = QString());
|
||||
QList<IFile *> saveModifiedFiles(const QList<IFile *> &files,
|
||||
bool *cancelled = 0,
|
||||
const QString &message = QString());
|
||||
|
||||
signals:
|
||||
void currentFileChanged(const QString &filePath);
|
||||
@@ -130,7 +129,6 @@ private:
|
||||
|
||||
QString m_currentFile;
|
||||
|
||||
Core::ICore *m_core;
|
||||
Internal::MainWindow *m_mainWindow;
|
||||
QFileSystemWatcher *m_fileWatcher;
|
||||
QList<QPointer<IFile> > m_changedFiles;
|
||||
|
||||
@@ -118,7 +118,7 @@ MainWindow::MainWindow() :
|
||||
m_printer(0),
|
||||
m_actionManager(new ActionManagerPrivate(this, m_uniqueIDManager)),
|
||||
m_editorManager(0),
|
||||
m_fileManager(new FileManager(m_coreImpl, this)),
|
||||
m_fileManager(new FileManager(this)),
|
||||
m_progressManager(new ProgressManagerPrivate()),
|
||||
m_scriptManager(new ScriptManagerPrivate(this, m_coreImpl)),
|
||||
m_variableManager(new VariableManager(this)),
|
||||
@@ -217,9 +217,8 @@ void MainWindow::toggleNavigation()
|
||||
|
||||
void MainWindow::setSuppressNavigationWidget(bool suppress)
|
||||
{
|
||||
if (NavigationWidgetPlaceHolder::current()) {
|
||||
if (NavigationWidgetPlaceHolder::current())
|
||||
m_navigationWidget->setSuppressed(suppress);
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@@ -319,7 +318,7 @@ void MainWindow::extensionsInitialized()
|
||||
m_viewManager->extensionsInitalized();
|
||||
|
||||
m_messageManager->init(m_pluginManager);
|
||||
m_outputPane->init(m_coreImpl, m_pluginManager);
|
||||
m_outputPane->init(m_pluginManager);
|
||||
|
||||
m_actionManager->initialize();
|
||||
readSettings();
|
||||
|
||||
@@ -156,7 +156,6 @@ OutputPane::OutputPane(const QList<int> &context, QWidget *parent) :
|
||||
m_closeButton(new QToolButton),
|
||||
m_closeAction(0),
|
||||
m_pluginManager(0),
|
||||
m_core(0),
|
||||
m_lastIndex(-1),
|
||||
m_outputWidgetPane(new QStackedWidget),
|
||||
m_opToolBarWidgets(new QStackedWidget)
|
||||
@@ -206,12 +205,11 @@ QWidget *OutputPane::buttonsWidget()
|
||||
return m_buttonsWidget;
|
||||
}
|
||||
|
||||
void OutputPane::init(ICore *core, ExtensionSystem::PluginManager *pm)
|
||||
void OutputPane::init(ExtensionSystem::PluginManager *pm)
|
||||
{
|
||||
m_pluginManager = pm;
|
||||
m_core = core;
|
||||
|
||||
ActionManager *am = m_core->actionManager();
|
||||
ActionManager *am = Core::ICore::instance()->actionManager();
|
||||
ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
|
||||
// Window->Output Panes
|
||||
|
||||
@@ -51,7 +51,6 @@ namespace ExtensionSystem { class PluginManager; }
|
||||
|
||||
namespace Core {
|
||||
|
||||
class ICore;
|
||||
class IMode;
|
||||
class IOutputPane;
|
||||
|
||||
@@ -89,7 +88,7 @@ class OutputPane
|
||||
public:
|
||||
OutputPane(const QList<int> &context, QWidget *parent = 0);
|
||||
~OutputPane();
|
||||
void init(Core::ICore *core, ExtensionSystem::PluginManager *pm);
|
||||
void init(ExtensionSystem::PluginManager *pm);
|
||||
static OutputPane *instance();
|
||||
const QList<int> &context() const { return m_context; }
|
||||
void setCloseable(bool b);
|
||||
@@ -123,7 +122,6 @@ private:
|
||||
QAction *m_closeAction;
|
||||
|
||||
ExtensionSystem::PluginManager *m_pluginManager;
|
||||
Core::ICore *m_core;
|
||||
|
||||
QMap<int, Core::IOutputPane*> m_pageMap;
|
||||
int m_lastIndex;
|
||||
|
||||
@@ -46,11 +46,10 @@
|
||||
using namespace Designer::Internal;
|
||||
using namespace Designer::Constants;
|
||||
|
||||
FormEditorFactory::FormEditorFactory(Core::ICore *core) :
|
||||
Core::IEditorFactory(core),
|
||||
FormEditorFactory::FormEditorFactory()
|
||||
: Core::IEditorFactory(Core::ICore::instance()),
|
||||
m_kind(QLatin1String(C_FORMEDITOR)),
|
||||
m_mimeTypes(QLatin1String(FORM_MIMETYPE)),
|
||||
m_core(core)
|
||||
m_mimeTypes(QLatin1String(FORM_MIMETYPE))
|
||||
{
|
||||
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
||||
iconProvider->registerIconForSuffix(QIcon(":/formeditor/images/qt_ui.png"),
|
||||
@@ -64,7 +63,7 @@ QString FormEditorFactory::kind() const
|
||||
|
||||
Core::IFile *FormEditorFactory::open(const QString &fileName)
|
||||
{
|
||||
Core::IEditor *iface = m_core->editorManager()->openEditor(fileName, kind());
|
||||
Core::IEditor *iface = Core::ICore::instance()->editorManager()->openEditor(fileName, kind());
|
||||
return iface ? iface->file() : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
class IEditor;
|
||||
class IFile;
|
||||
}
|
||||
@@ -52,10 +51,11 @@ class FormEditorFactory : public Core::IEditorFactory
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FormEditorFactory(Core::ICore *core);
|
||||
FormEditorFactory();
|
||||
|
||||
virtual QStringList mimeTypes() const;
|
||||
//EditorFactory
|
||||
|
||||
// IEditorFactory
|
||||
virtual QString kind() const;
|
||||
Core::IFile *open(const QString &fileName);
|
||||
Core::IEditor *createEditor(QWidget *parent);
|
||||
@@ -63,7 +63,6 @@ public:
|
||||
private:
|
||||
const QString m_kind;
|
||||
const QStringList m_mimeTypes;
|
||||
Core::ICore *m_core;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -104,7 +104,7 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
const int uid = core->uniqueIDManager()->uniqueIdentifier(QLatin1String(C_FORMEDITOR));
|
||||
const QList<int> context = QList<int>() << uid;
|
||||
|
||||
m_factory = new FormEditorFactory(core);
|
||||
m_factory = new FormEditorFactory;
|
||||
addObject(m_factory);
|
||||
|
||||
// Make sure settings pages and action shortcuts are registered
|
||||
|
||||
@@ -561,8 +561,9 @@ FormWindowEditor *FormEditorW::createFormWindowEditor(QWidget* parentWidget)
|
||||
QDesignerFormWindowInterface *form = m_fwm->createFormWindow(0);
|
||||
connect(form, SIGNAL(toolChanged(int)), this, SLOT(toolChanged(int)));
|
||||
qdesigner_internal::FormWindowBase::setupDefaultAction(form);
|
||||
FormWindowEditor *fww = new FormWindowEditor(m_core, m_context, form, parentWidget);
|
||||
// Store a pointer to all form windows so we can unselect all other formwindows except the active one.
|
||||
FormWindowEditor *fww = new FormWindowEditor(m_context, form, parentWidget);
|
||||
// Store a pointer to all form windows so we can unselect
|
||||
// all other formwindows except the active one.
|
||||
m_formWindows.append(fww);
|
||||
connect(fww, SIGNAL(destroyed()), this, SLOT(editorDestroyed()));
|
||||
return fww;
|
||||
@@ -604,7 +605,8 @@ void FormEditorW::currentEditorChanged(Core::IEditor *editor)
|
||||
void FormEditorW::activeFormWindowChanged(QDesignerFormWindowInterface *afw)
|
||||
{
|
||||
if (debugFormEditor)
|
||||
qDebug() << "FormEditorW::activeFormWindowChanged" << afw << " of " << m_fwm->formWindowCount() << m_formWindows;
|
||||
qDebug() << "FormEditorW::activeFormWindowChanged" << afw
|
||||
<< " of " << m_fwm->formWindowCount() << m_formWindows;
|
||||
|
||||
m_fwm->closeAllPreviews();
|
||||
|
||||
|
||||
@@ -96,14 +96,13 @@ void QrcFilesVisitor::visitFolderNode(FolderNode *folderNode)
|
||||
}
|
||||
|
||||
|
||||
FormWindowEditor::FormWindowEditor(Core::ICore *core,
|
||||
const QList<int> &context,
|
||||
FormWindowEditor::FormWindowEditor(const QList<int> &context,
|
||||
QDesignerFormWindowInterface *form,
|
||||
QObject *parent) :
|
||||
Core::IEditor(parent),
|
||||
QObject *parent)
|
||||
: Core::IEditor(parent),
|
||||
m_context(context),
|
||||
m_formWindow(form),
|
||||
m_file(new FormWindowFile(core, form, this)),
|
||||
m_file(new FormWindowFile(form, this)),
|
||||
m_host(new FormWindowHost(form)),
|
||||
m_editorWidget(new EditorWidget(m_host)),
|
||||
m_toolBar(0),
|
||||
|
||||
@@ -45,10 +45,6 @@ class QDesignerFormWindowManagerInterface;
|
||||
class QFile;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
}
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class SessionNode;
|
||||
class NodesWatcher;
|
||||
@@ -60,6 +56,7 @@ namespace Internal {
|
||||
class FormWindowFile;
|
||||
class FormWindowHost;
|
||||
class EditorWidget;
|
||||
|
||||
// Master class maintaining a form window editor,
|
||||
// containing file and widget host
|
||||
|
||||
@@ -68,8 +65,7 @@ class FormWindowEditor : public Core::IEditor
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FormWindowEditor(Core::ICore *core,
|
||||
const QList<int> &context,
|
||||
FormWindowEditor(const QList<int> &context,
|
||||
QDesignerFormWindowInterface *form,
|
||||
QObject *parent = 0);
|
||||
~FormWindowEditor();
|
||||
@@ -85,7 +81,7 @@ public:
|
||||
void setDisplayName(const QString &title);
|
||||
QToolBar *toolBar();
|
||||
QByteArray saveState() const;
|
||||
bool restoreState(const QByteArray &/*state*/);
|
||||
bool restoreState(const QByteArray &state);
|
||||
|
||||
// ContextInterface
|
||||
QList<int> context() const;
|
||||
|
||||
@@ -56,17 +56,10 @@ using namespace SharedTools;
|
||||
enum { debugFormWindowFile = 0 };
|
||||
|
||||
|
||||
FormWindowFile::FormWindowFile(Core::ICore *core,
|
||||
QDesignerFormWindowInterface *form,
|
||||
QObject *parent) :
|
||||
Core::IFile(parent),
|
||||
FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *parent)
|
||||
: Core::IFile(parent),
|
||||
m_mimeType(QLatin1String(FORM_MIMETYPE)),
|
||||
m_formWindow(form),
|
||||
m_core(core)
|
||||
{
|
||||
}
|
||||
|
||||
FormWindowFile::~FormWindowFile()
|
||||
m_formWindow(form)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -141,7 +134,7 @@ void FormWindowFile::modified(Core::IFile::ReloadBehavior *behavior)
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Core::Utils::reloadPrompt(m_fileName, m_core->mainWindow())) {
|
||||
switch (Core::Utils::reloadPrompt(m_fileName, Core::ICore::instance()->mainWindow())) {
|
||||
case Core::Utils::ReloadCurrent:
|
||||
emit reload(m_fileName);
|
||||
break;
|
||||
|
||||
@@ -41,31 +41,22 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDesignerFormWindowInterface;
|
||||
class QDesignerFormWindowManagerInterface;
|
||||
class QFile;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
}
|
||||
|
||||
namespace Designer {
|
||||
namespace Internal {
|
||||
|
||||
class FormWindowSelection;
|
||||
|
||||
class FormWindowFile
|
||||
: public Core::IFile
|
||||
class FormWindowFile : public Core::IFile
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FormWindowFile(Core::ICore *core,
|
||||
QDesignerFormWindowInterface *form,
|
||||
QObject *parent = 0);
|
||||
~FormWindowFile();
|
||||
FormWindowFile(QDesignerFormWindowInterface *form, QObject *parent = 0);
|
||||
|
||||
//IFile
|
||||
// IFile
|
||||
bool save(const QString &fileName = QString());
|
||||
QString fileName() const;
|
||||
bool isModified() const;
|
||||
@@ -97,7 +88,6 @@ private:
|
||||
QString m_suggestedName;
|
||||
|
||||
QDesignerFormWindowInterface *m_formWindow;
|
||||
Core::ICore *m_core;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include <vcsbase/basevcssubmiteditorfactory.h>
|
||||
#include <vcsbase/vcsbaseeditor.h>
|
||||
|
||||
#include <QtCore/qplugin.h>
|
||||
#include <QtCore/QtPlugin>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
@@ -95,7 +95,7 @@ QString PromptDialog::input() const
|
||||
WorkbenchClientUser::WorkbenchClientUser(PerforceOutputWindow *out, PerforcePlugin *plugin) :
|
||||
QObject(out),
|
||||
m_plugin(plugin),
|
||||
m_coreIFace(PerforcePlugin::coreInstance()),
|
||||
m_core(Core::ICore::instance()),
|
||||
m_currentEditorIface(0),
|
||||
m_userCancelled(false),
|
||||
m_mode(Submit),
|
||||
@@ -103,7 +103,7 @@ WorkbenchClientUser::WorkbenchClientUser(PerforceOutputWindow *out, PerforcePlug
|
||||
m_skipNextMsg(false),
|
||||
m_eventLoop(new QEventLoop(this))
|
||||
{
|
||||
connect(m_coreIFace, SIGNAL(coreAboutToClose()),
|
||||
connect(m_core, SIGNAL(coreAboutToClose()),
|
||||
this, SLOT(cancelP4Command()));
|
||||
}
|
||||
|
||||
@@ -147,13 +147,13 @@ void WorkbenchClientUser::displayErrorMsg(const QString &msg)
|
||||
const QString title = tr("Perforce Error");
|
||||
switch (m_mode) {
|
||||
case Submit: {
|
||||
QMessageBox msgBox(QMessageBox::Critical, title, msg, QMessageBox::Ok, m_coreIFace->mainWindow());
|
||||
QMessageBox msgBox(QMessageBox::Critical, title, msg, QMessageBox::Ok, m_core->mainWindow());
|
||||
msgBox.setDetailedText(m_msg);
|
||||
msgBox.exec();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
QMessageBox::critical(m_coreIFace->mainWindow(), title, msg);
|
||||
QMessageBox::critical(m_core->mainWindow(), title, msg);
|
||||
break;
|
||||
}
|
||||
m_errMsg.clear();
|
||||
@@ -182,7 +182,7 @@ bool WorkbenchClientUser::editorAboutToClose(Core::IEditor *editor)
|
||||
if (editor && editor == m_currentEditorIface) {
|
||||
if (m_mode == WorkbenchClientUser::Submit) {
|
||||
const QMessageBox::StandardButton answer =
|
||||
QMessageBox::question(m_coreIFace->mainWindow(),
|
||||
QMessageBox::question(m_core->mainWindow(),
|
||||
tr("Closing p4 Editor"),
|
||||
tr("Do you want to submit this change list?"),
|
||||
QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel, QMessageBox::Yes);
|
||||
@@ -190,9 +190,9 @@ bool WorkbenchClientUser::editorAboutToClose(Core::IEditor *editor)
|
||||
return false;
|
||||
if (answer == QMessageBox::No)
|
||||
m_userCancelled = true;
|
||||
m_coreIFace->fileManager()->blockFileChange(m_currentEditorIface->file());
|
||||
m_core->fileManager()->blockFileChange(m_currentEditorIface->file());
|
||||
m_currentEditorIface->file()->save();
|
||||
m_coreIFace->fileManager()->unblockFileChange(m_currentEditorIface->file());
|
||||
m_core->fileManager()->unblockFileChange(m_currentEditorIface->file());
|
||||
}
|
||||
m_eventLoop->quit();
|
||||
m_currentEditorIface = 0;
|
||||
@@ -228,7 +228,7 @@ void WorkbenchClientUser::Diff(FileSys *f1, FileSys *f2, int, char *, Error *err
|
||||
delete file2;
|
||||
|
||||
QString title = QString("diff %1").arg(f1->Name());
|
||||
m_currentEditorIface = m_coreIFace->editorManager()->newFile("Perforce Editor", &title, tmp.readAll());
|
||||
m_currentEditorIface = m_core->editorManager()->newFile("Perforce Editor", &title, tmp.readAll());
|
||||
if (!m_currentEditorIface) {
|
||||
err->Set(E_FAILED, "p4 data could not be opened!");
|
||||
return;
|
||||
@@ -246,8 +246,8 @@ void WorkbenchClientUser::Edit(FileSys *f, Error *err)
|
||||
m_currentEditorIface = m_plugin->openPerforceSubmitEditor(fileName, QStringList());
|
||||
}
|
||||
else {
|
||||
m_currentEditorIface = m_coreIFace->editorManager()->openEditor(fileName);
|
||||
m_coreIFace->editorManager()->ensureEditorManagerVisible();
|
||||
m_currentEditorIface = m_core->editorManager()->openEditor(fileName);
|
||||
m_core->editorManager()->ensureEditorManagerVisible();
|
||||
}
|
||||
if (!m_currentEditorIface) {
|
||||
err->Set(E_FAILED, "p4 data could not be opened!");
|
||||
@@ -265,7 +265,7 @@ void WorkbenchClientUser::Prompt(const StrPtr &msg, StrBuf &answer, int , Error
|
||||
err->Set(E_FATAL, "");
|
||||
return;
|
||||
}
|
||||
PromptDialog dia(msg.Text(), m_msg, qobject_cast<QWidget*>(m_coreIFace));
|
||||
PromptDialog dia(msg.Text(), m_msg, qobject_cast<QWidget*>(m_core));
|
||||
dia.exec();
|
||||
answer = qstrdup(dia.input().toLatin1().constData());
|
||||
if (m_mode == WorkbenchClientUser::Resolve) {
|
||||
@@ -282,5 +282,5 @@ void WorkbenchClientUser::Prompt(const StrPtr &msg, StrBuf &answer, int , Error
|
||||
|
||||
void WorkbenchClientUser::ErrorPause(char *msg, Error *)
|
||||
{
|
||||
QMessageBox::warning(m_coreIFace->mainWindow(), tr("Perforce Error"), QString::fromUtf8(msg));
|
||||
QMessageBox::warning(m_core->mainWindow(), tr("Perforce Error"), QString::fromUtf8(msg));
|
||||
}
|
||||
|
||||
@@ -61,8 +61,7 @@ class PerforcePlugin;
|
||||
class PromptDialog : public QDialog
|
||||
{
|
||||
public:
|
||||
PromptDialog(const QString &choice, const QString &text,
|
||||
QWidget *parent = 0);
|
||||
PromptDialog(const QString &choice, const QString &text, QWidget *parent = 0);
|
||||
QString input() const;
|
||||
|
||||
private:
|
||||
@@ -96,7 +95,7 @@ private:
|
||||
void displayErrorMsg(const QString &msg);
|
||||
|
||||
PerforcePlugin *m_plugin;
|
||||
Core::ICore *m_coreIFace;
|
||||
Core::ICore *m_core;
|
||||
Core::IEditor *m_currentEditorIface;
|
||||
bool m_userCancelled;
|
||||
Mode m_mode;
|
||||
|
||||
@@ -61,7 +61,7 @@ class FirstRowFilter : public QSortFilterProxyModel
|
||||
public:
|
||||
FirstRowFilter(QObject *parent = 0) : QSortFilterProxyModel(parent) {}
|
||||
protected:
|
||||
bool filterAcceptsRow (int source_row, const QModelIndex & ) const {
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex &) const {
|
||||
return source_row != 0;
|
||||
}
|
||||
};
|
||||
@@ -74,15 +74,14 @@ protected:
|
||||
|
||||
Shows a file system folder
|
||||
*/
|
||||
FolderNavigationWidget::FolderNavigationWidget(Core::ICore *core, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
m_core(core),
|
||||
m_explorer(ProjectExplorerPlugin::instance()),
|
||||
m_view(new QListView(this)),
|
||||
m_dirModel(new QDirModel(this)),
|
||||
m_filter(new FirstRowFilter(this)),
|
||||
m_title(new QLabel(this)),
|
||||
m_autoSync(false)
|
||||
FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
m_explorer(ProjectExplorerPlugin::instance()),
|
||||
m_view(new QListView(this)),
|
||||
m_dirModel(new QDirModel(this)),
|
||||
m_filter(new FirstRowFilter(this)),
|
||||
m_title(new QLabel(this)),
|
||||
m_autoSync(false)
|
||||
{
|
||||
m_dirModel->setFilter(QDir::Dirs | QDir::Files | QDir::Drives | QDir::Readable | QDir::Writable
|
||||
| QDir::Executable | QDir::Hidden);
|
||||
@@ -124,14 +123,14 @@ void FolderNavigationWidget::setAutoSynchronization(bool sync)
|
||||
|
||||
m_autoSync = sync;
|
||||
|
||||
Core::FileManager *fileManager = m_core->fileManager();
|
||||
Core::FileManager *fileManager = Core::ICore::instance()->fileManager();
|
||||
if (m_autoSync) {
|
||||
connect(fileManager, SIGNAL(currentFileChanged(const QString&)),
|
||||
this, SLOT(setCurrentFile(const QString&)));
|
||||
connect(fileManager, SIGNAL(currentFileChanged(QString)),
|
||||
this, SLOT(setCurrentFile(QString)));
|
||||
setCurrentFile(fileManager->currentFile());
|
||||
} else {
|
||||
disconnect(fileManager, SIGNAL(currentFileChanged(const QString&)),
|
||||
this, SLOT(setCurrentFile(const QString&)));
|
||||
disconnect(fileManager, SIGNAL(currentFileChanged(QString)),
|
||||
this, SLOT(setCurrentFile(QString)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,8 +170,9 @@ void FolderNavigationWidget::openItem(const QModelIndex &index)
|
||||
setCurrentTitle(QDir(m_dirModel->filePath(srcIndex)));
|
||||
} else {
|
||||
const QString filePath = m_dirModel->filePath(srcIndex);
|
||||
m_core->editorManager()->openEditor(filePath);
|
||||
m_core->editorManager()->ensureEditorManagerVisible();
|
||||
Core::EditorManager *editorManager = Core::ICore::instance()->editorManager();
|
||||
editorManager->openEditor(filePath);
|
||||
editorManager->ensureEditorManagerVisible();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,8 +183,7 @@ void FolderNavigationWidget::setCurrentTitle(const QDir &dir)
|
||||
m_title->setToolTip(dir.absolutePath());
|
||||
}
|
||||
|
||||
FolderNavigationWidgetFactory::FolderNavigationWidgetFactory(Core::ICore *core)
|
||||
: m_core(core)
|
||||
FolderNavigationWidgetFactory::FolderNavigationWidgetFactory()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -205,7 +204,7 @@ QKeySequence FolderNavigationWidgetFactory::activationSequence()
|
||||
Core::NavigationView FolderNavigationWidgetFactory::createWidget()
|
||||
{
|
||||
Core::NavigationView n;
|
||||
FolderNavigationWidget *ptw = new FolderNavigationWidget(m_core);
|
||||
FolderNavigationWidget *ptw = new FolderNavigationWidget;
|
||||
n.widget = ptw;
|
||||
QToolButton *toggleSync = new QToolButton;
|
||||
toggleSync->setProperty("type", "dockbutton");
|
||||
|
||||
@@ -36,15 +36,11 @@
|
||||
|
||||
#include <coreplugin/inavigationwidgetfactory.h>
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QListView>
|
||||
#include <QtGui/QDirModel>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QListView>
|
||||
#include <QtGui/QSortFilterProxyModel>
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
}
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
@@ -54,10 +50,11 @@ class Node;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class FolderNavigationWidget : public QWidget {
|
||||
class FolderNavigationWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FolderNavigationWidget(Core::ICore *core, QWidget *parent = 0);
|
||||
FolderNavigationWidget(QWidget *parent = 0);
|
||||
|
||||
bool autoSynchronization() const;
|
||||
void setAutoSynchronization(bool sync);
|
||||
@@ -74,7 +71,6 @@ private slots:
|
||||
private:
|
||||
void setCurrentTitle(const QDir &directory);
|
||||
|
||||
Core::ICore *m_core;
|
||||
ProjectExplorerPlugin *m_explorer;
|
||||
QListView *m_view;
|
||||
QDirModel *m_dirModel;
|
||||
@@ -86,14 +82,12 @@ private:
|
||||
class FolderNavigationWidgetFactory : public Core::INavigationWidgetFactory
|
||||
{
|
||||
public:
|
||||
FolderNavigationWidgetFactory(Core::ICore *core);
|
||||
FolderNavigationWidgetFactory();
|
||||
virtual ~FolderNavigationWidgetFactory();
|
||||
|
||||
virtual QString displayName();
|
||||
virtual QKeySequence activationSequence();
|
||||
virtual Core::NavigationView createWidget();
|
||||
private:
|
||||
Core::ICore *m_core;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
using namespace ProjectExplorer::Internal;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
OutputPane::OutputPane(Core::ICore *core)
|
||||
OutputPane::OutputPane()
|
||||
: m_mainWidget(new QWidget)
|
||||
{
|
||||
// m_insertLineButton = new QToolButton;
|
||||
@@ -78,7 +78,7 @@ OutputPane::OutputPane(Core::ICore *core)
|
||||
this, SLOT(reRunRunControl()));
|
||||
|
||||
// Stop
|
||||
Core::ActionManager *am = core->actionManager();
|
||||
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
||||
QList<int> globalcontext;
|
||||
globalcontext.append(Core::Constants::C_GLOBAL_ID);
|
||||
|
||||
@@ -107,8 +107,7 @@ OutputPane::OutputPane(Core::ICore *core)
|
||||
connect(m_tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
|
||||
layout->addWidget(m_tabWidget);
|
||||
|
||||
connect(m_tabWidget, SIGNAL(currentChanged(int)),
|
||||
this, SLOT(tabChanged(int)));
|
||||
connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
|
||||
|
||||
m_mainWidget->setLayout(layout);
|
||||
}
|
||||
@@ -129,7 +128,7 @@ QWidget *OutputPane::outputWidget(QWidget *)
|
||||
return m_mainWidget;
|
||||
}
|
||||
|
||||
QList<QWidget*> OutputPane::toolBarWidgets(void) const
|
||||
QList<QWidget*> OutputPane::toolBarWidgets() const
|
||||
{
|
||||
return QList<QWidget*>() << m_reRunButton << m_stopButton
|
||||
; // << m_insertLineButton;
|
||||
|
||||
@@ -48,10 +48,6 @@ QT_BEGIN_NAMESPACE
|
||||
class QTabWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
}
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
class RunControl;
|
||||
@@ -65,7 +61,7 @@ class OutputPane : public Core::IOutputPane
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
OutputPane(Core::ICore *core);
|
||||
OutputPane();
|
||||
~OutputPane();
|
||||
|
||||
QWidget *outputWidget(QWidget *);
|
||||
|
||||
@@ -157,10 +157,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
|
||||
addObject(this);
|
||||
|
||||
connect(core->fileManager(), SIGNAL(currentFileChanged(const QString&)),
|
||||
this, SLOT(setCurrentFile(const QString&)));
|
||||
connect(core->fileManager(), SIGNAL(currentFileChanged(QString)),
|
||||
this, SLOT(setCurrentFile(QString)));
|
||||
|
||||
m_session = new SessionManager(core, this);
|
||||
m_session = new SessionManager(this);
|
||||
|
||||
connect(m_session, SIGNAL(projectAdded(ProjectExplorer::Project *)),
|
||||
this, SIGNAL(fileListChanged()));
|
||||
@@ -199,7 +199,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
|
||||
addAutoReleasedObject(new CoreListenerCheckingForRunningBuild(m_buildManager));
|
||||
|
||||
m_outputPane = new OutputPane(core);
|
||||
m_outputPane = new OutputPane;
|
||||
addAutoReleasedObject(m_outputPane);
|
||||
connect(m_session, SIGNAL(projectRemoved(ProjectExplorer::Project *)),
|
||||
m_outputPane, SLOT(projectRemoved()));
|
||||
@@ -589,8 +589,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
connect(core, SIGNAL(saveSettingsRequested()),
|
||||
this, SLOT(savePersistentSettings()));
|
||||
|
||||
addAutoReleasedObject(new ProjectTreeWidgetFactory(core));
|
||||
addAutoReleasedObject(new FolderNavigationWidgetFactory(core));
|
||||
addAutoReleasedObject(new ProjectTreeWidgetFactory);
|
||||
addAutoReleasedObject(new FolderNavigationWidgetFactory);
|
||||
|
||||
if (QSettings *s = core->settings())
|
||||
m_recentProjects = s->value("ProjectExplorer/RecentProjects/Files", QStringList()).toStringList();
|
||||
|
||||
@@ -112,9 +112,8 @@ protected:
|
||||
|
||||
Shows the projects in form of a tree.
|
||||
*/
|
||||
ProjectTreeWidget::ProjectTreeWidget(Core::ICore *core, QWidget *parent)
|
||||
ProjectTreeWidget::ProjectTreeWidget(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
m_core(core),
|
||||
m_explorer(ProjectExplorerPlugin::instance()),
|
||||
m_view(0),
|
||||
m_model(0),
|
||||
@@ -282,9 +281,8 @@ void ProjectTreeWidget::initView()
|
||||
m_model->fetchMore(sessionIndex);
|
||||
|
||||
// expand top level projects
|
||||
for (int i = 0; i < m_model->rowCount(sessionIndex); ++i) {
|
||||
for (int i = 0; i < m_model->rowCount(sessionIndex); ++i)
|
||||
m_view->expand(m_model->index(i, 0, sessionIndex));
|
||||
}
|
||||
|
||||
setCurrentItem(m_explorer->currentNode(), m_explorer->currentProject());
|
||||
}
|
||||
@@ -293,8 +291,9 @@ void ProjectTreeWidget::openItem(const QModelIndex &mainIndex)
|
||||
{
|
||||
Node *node = m_model->nodeForIndex(mainIndex);
|
||||
if (node->nodeType() == FileNodeType) {
|
||||
m_core->editorManager()->openEditor(node->path());
|
||||
m_core->editorManager()->ensureEditorManagerVisible();
|
||||
Core::EditorManager *editorManager = Core::ICore::instance()->editorManager();
|
||||
editorManager->openEditor(node->path());
|
||||
editorManager->ensureEditorManagerVisible();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,8 +320,7 @@ bool ProjectTreeWidget::projectFilter()
|
||||
}
|
||||
|
||||
|
||||
ProjectTreeWidgetFactory::ProjectTreeWidgetFactory(Core::ICore *core)
|
||||
: m_core(core)
|
||||
ProjectTreeWidgetFactory::ProjectTreeWidgetFactory()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -343,7 +341,7 @@ QKeySequence ProjectTreeWidgetFactory::activationSequence()
|
||||
Core::NavigationView ProjectTreeWidgetFactory::createWidget()
|
||||
{
|
||||
Core::NavigationView n;
|
||||
ProjectTreeWidget *ptw = new ProjectTreeWidget(m_core);
|
||||
ProjectTreeWidget *ptw = new ProjectTreeWidget;
|
||||
n.widget = ptw;
|
||||
|
||||
QToolButton *filter = new QToolButton;
|
||||
@@ -364,16 +362,18 @@ void ProjectTreeWidgetFactory::saveSettings(int position, QWidget *widget)
|
||||
{
|
||||
ProjectTreeWidget *ptw = qobject_cast<ProjectTreeWidget *>(widget);
|
||||
Q_ASSERT(ptw);
|
||||
m_core->settings()->setValue("ProjectTreeWidget."+QString::number(position)+".ProjectFilter", ptw->projectFilter());
|
||||
m_core->settings()->setValue("ProjectTreeWidget."+QString::number(position)+".GeneratedFilter", ptw->generatedFilesFilter());
|
||||
m_core->settings()->setValue("ProjectTreeWidget."+QString::number(position)+".SyncWithEditor", ptw->autoSynchronization());
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
settings->setValue("ProjectTreeWidget."+QString::number(position)+".ProjectFilter", ptw->projectFilter());
|
||||
settings->setValue("ProjectTreeWidget."+QString::number(position)+".GeneratedFilter", ptw->generatedFilesFilter());
|
||||
settings->setValue("ProjectTreeWidget."+QString::number(position)+".SyncWithEditor", ptw->autoSynchronization());
|
||||
}
|
||||
|
||||
void ProjectTreeWidgetFactory::restoreSettings(int position, QWidget *widget)
|
||||
{
|
||||
ProjectTreeWidget *ptw = qobject_cast<ProjectTreeWidget *>(widget);
|
||||
Q_ASSERT(ptw);
|
||||
ptw->setProjectFilter(m_core->settings()->value("ProjectTreeWidget."+QString::number(position)+".ProjectFilter", false).toBool());
|
||||
ptw->setGeneratedFilesFilter(m_core->settings()->value("ProjectTreeWidget."+QString::number(position)+".GeneratedFilter", true).toBool());
|
||||
ptw->setAutoSynchronization(m_core->settings()->value("ProjectTreeWidget."+QString::number(position)+".SyncWithEditor", true).toBool());
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
ptw->setProjectFilter(settings->value("ProjectTreeWidget."+QString::number(position)+".ProjectFilter", false).toBool());
|
||||
ptw->setGeneratedFilesFilter(settings->value("ProjectTreeWidget."+QString::number(position)+".GeneratedFilter", true).toBool());
|
||||
ptw->setAutoSynchronization(settings->value("ProjectTreeWidget."+QString::number(position)+".SyncWithEditor", true).toBool());
|
||||
}
|
||||
|
||||
@@ -39,10 +39,6 @@
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QTreeView>
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
}
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
class ProjectExplorerPlugin;
|
||||
@@ -53,10 +49,11 @@ namespace Internal {
|
||||
|
||||
class FlatModel;
|
||||
|
||||
class ProjectTreeWidget : public QWidget {
|
||||
class ProjectTreeWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProjectTreeWidget(Core::ICore *core, QWidget *parent = 0);
|
||||
explicit ProjectTreeWidget(QWidget *parent = 0);
|
||||
|
||||
bool autoSynchronization() const;
|
||||
void setAutoSynchronization(bool sync, bool syncNow = true);
|
||||
@@ -81,7 +78,6 @@ private slots:
|
||||
void initView();
|
||||
|
||||
private:
|
||||
Core::ICore *m_core;
|
||||
ProjectExplorerPlugin *m_explorer;
|
||||
QTreeView *m_view;
|
||||
FlatModel *m_model;
|
||||
@@ -99,15 +95,13 @@ private:
|
||||
class ProjectTreeWidgetFactory : public Core::INavigationWidgetFactory
|
||||
{
|
||||
public:
|
||||
ProjectTreeWidgetFactory(Core::ICore *core);
|
||||
ProjectTreeWidgetFactory();
|
||||
virtual ~ProjectTreeWidgetFactory();
|
||||
virtual QString displayName();
|
||||
virtual QKeySequence activationSequence();
|
||||
virtual Core::NavigationView createWidget();
|
||||
void restoreSettings(int position, QWidget *widget);
|
||||
void saveSettings(int position, QWidget *widget);
|
||||
private:
|
||||
Core::ICore *m_core;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -70,13 +70,12 @@ namespace {
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
|
||||
class SessionFile
|
||||
: public Core::IFile
|
||||
class SessionFile : public Core::IFile
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SessionFile(Core::ICore *core);
|
||||
SessionFile();
|
||||
|
||||
bool load(const QString &fileName);
|
||||
bool save(const QString &fileName = QString());
|
||||
@@ -126,9 +125,9 @@ void SessionFile::sessionLoadingProgress()
|
||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
}
|
||||
|
||||
SessionFile::SessionFile(Core::ICore *core) :
|
||||
m_mimeType(QLatin1String(ProjectExplorer::Constants::SESSIONFILE_MIMETYPE)),
|
||||
m_core(core),
|
||||
SessionFile::SessionFile()
|
||||
: m_mimeType(QLatin1String(ProjectExplorer::Constants::SESSIONFILE_MIMETYPE)),
|
||||
m_core(Core::ICore::instance()),
|
||||
m_startupProject(0)
|
||||
{
|
||||
}
|
||||
@@ -369,10 +368,10 @@ void Internal::SessionNodeImpl::setFileName(const QString &fileName)
|
||||
|
||||
/* --------------------------------- */
|
||||
|
||||
SessionManager::SessionManager(Core::ICore *core, QObject *parent)
|
||||
: QObject(parent),
|
||||
m_core(core),
|
||||
m_file(new SessionFile(core)),
|
||||
SessionManager::SessionManager(QObject *parent)
|
||||
: QObject(parent),
|
||||
m_core(Core::ICore::instance()),
|
||||
m_file(new SessionFile),
|
||||
m_sessionNode(new Internal::SessionNodeImpl(this))
|
||||
{
|
||||
// Create qtcreator dir if it doesn't yet exist
|
||||
@@ -394,12 +393,11 @@ SessionManager::SessionManager(Core::ICore *core, QObject *parent)
|
||||
|
||||
connect(m_core->modeManager(), SIGNAL(currentModeChanged(Core::IMode*)),
|
||||
this, SLOT(saveActiveMode(Core::IMode*)));
|
||||
connect(core->editorManager(), SIGNAL(editorCreated(Core::IEditor *, QString)),
|
||||
connect(m_core->editorManager(), SIGNAL(editorCreated(Core::IEditor *, QString)),
|
||||
this, SLOT(setEditorCodec(Core::IEditor *, QString)));
|
||||
connect(ProjectExplorerPlugin::instance(), SIGNAL(currentProjectChanged(ProjectExplorer::Project *)),
|
||||
this, SLOT(updateWindowTitle()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
SessionManager::~SessionManager()
|
||||
{
|
||||
@@ -415,7 +413,6 @@ bool SessionManager::isDefaultVirgin() const
|
||||
&& m_core->editorManager()->openedEditors().isEmpty();
|
||||
}
|
||||
|
||||
|
||||
bool SessionManager::isDefaultSession(const QString &session) const
|
||||
{
|
||||
return session == QLatin1String("default");
|
||||
@@ -600,7 +597,7 @@ bool SessionManager::createImpl(const QString &fileName)
|
||||
if (success) {
|
||||
delete m_file;
|
||||
emit sessionUnloaded();
|
||||
m_file = new SessionFile(m_core);
|
||||
m_file = new SessionFile;
|
||||
m_file->setFileName(fileName);
|
||||
setStartupProject(defaultStartupProject());
|
||||
}
|
||||
@@ -634,10 +631,11 @@ bool SessionManager::loadImpl(const QString &fileName)
|
||||
|
||||
if (success) {
|
||||
delete m_file;
|
||||
m_file = 0;
|
||||
emit sessionUnloaded();
|
||||
m_file = new SessionFile(m_core);
|
||||
m_file = new SessionFile;
|
||||
if (!m_file->load(fileName)) {
|
||||
QMessageBox::warning(0, tr("Error while loading session"), \
|
||||
QMessageBox::warning(0, tr("Error while loading session"),
|
||||
tr("Could not load session %1").arg(fileName));
|
||||
success = false;
|
||||
}
|
||||
@@ -880,7 +878,6 @@ void SessionManager::setEditorCodec(Core::IEditor *editor, const QString &fileNa
|
||||
textEditor->setTextCodec(project->editorConfiguration()->defaultTextCodec());
|
||||
}
|
||||
|
||||
|
||||
QList<Project *> SessionManager::requestCloseOfAllFiles(bool *cancelled)
|
||||
{
|
||||
*cancelled = false;
|
||||
|
||||
@@ -65,8 +65,7 @@ class SessionFile;
|
||||
|
||||
// Must be in header as otherwise moc has issues
|
||||
// with ProjectExplorer::SessionNode on msvc2005
|
||||
class SessionNodeImpl
|
||||
: public ProjectExplorer::SessionNode
|
||||
class SessionNodeImpl : public ProjectExplorer::SessionNode
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -86,13 +85,12 @@ public:
|
||||
// public interface just wrap around functions which do the actual work
|
||||
|
||||
// This could be improved.
|
||||
class PROJECTEXPLORER_EXPORT SessionManager
|
||||
: public QObject
|
||||
class PROJECTEXPLORER_EXPORT SessionManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SessionManager(Core::ICore *core, QObject *parent = 0);
|
||||
explicit SessionManager(QObject *parent = 0);
|
||||
~SessionManager();
|
||||
|
||||
// higher level session management
|
||||
|
||||
@@ -33,19 +33,19 @@
|
||||
|
||||
#include "qtestlibplugin.h"
|
||||
|
||||
#include <Qt4IProjectManagers>
|
||||
#include <texteditor/TextEditorInterfaces>
|
||||
//#include <Qt4IProjectManagers>
|
||||
//#include <texteditor/TextEditorInterfaces>
|
||||
|
||||
#include <QtCore/QAction>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QIcon>
|
||||
#include <QtCore/QKeySequence>
|
||||
#include <QtCore/QTemporaryFile>
|
||||
#include <QtCore/QtPlugin>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtGui/QComboBox>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtGui/QKeySequence>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QSplitter>
|
||||
#include <QtGui/QStandardItemModel>
|
||||
@@ -129,10 +129,9 @@ QTestLibPlugin::~QTestLibPlugin()
|
||||
m_core->pluginManager()->removeObject(m_outputPane);
|
||||
}
|
||||
|
||||
bool QTestLibPlugin::init(ExtensionSystem::PluginManagerInterface *app, QString * /*error_message*/)
|
||||
bool QTestLibPlugin::init(ExtensionSystem::PluginManagerInterface *app, QString *errorMessage)
|
||||
{
|
||||
m_core = app->getObject<Core::ICore>();
|
||||
|
||||
Q_UNUSED(errorMessage);
|
||||
m_projectExplorer = app->getObject<ProjectExplorer::ProjectExplorerPlugin>();
|
||||
connect(m_projectExplorer->qObject(), SIGNAL(aboutToExecuteProject(ProjectExplorer::Project *)),
|
||||
this, SLOT(projectRunHook(ProjectExplorer::Project *)));
|
||||
@@ -383,9 +382,8 @@ bool QTestOutputFilter::filterAcceptsRow(int sourceRow, const QModelIndex &sourc
|
||||
// ------- QTestOutputWidget
|
||||
|
||||
|
||||
QTestOutputWidget::QTestOutputWidget(QStandardItemModel *model, Core::ICore *coreInterface, QWidget *parent):
|
||||
QWidget(parent),
|
||||
m_coreInterface(coreInterface),
|
||||
QTestOutputWidget::QTestOutputWidget(QStandardItemModel *model, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
m_model(model),
|
||||
m_resultsView(new QTreeView(this)),
|
||||
m_filterCombo(new QComboBox(this)),
|
||||
|
||||
@@ -35,17 +35,19 @@
|
||||
#define QTESTLIBPLUGIN_H
|
||||
|
||||
#include <coreplugin/ioutputpane.h>
|
||||
#include <projectexplorer/ProjectExplorerInterfaces>
|
||||
//#include <projectexplorer/ProjectExplorerInterfaces>
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QStandardItem>
|
||||
#include <QWidget>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QStandardItem>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QSortFilterProxyModel>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QStandardItemModel;
|
||||
class QTreeView;
|
||||
class QTextEdit;
|
||||
class QComboBox;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace QTestLib {
|
||||
namespace Internal {
|
||||
@@ -96,11 +98,10 @@ public:
|
||||
static bool indexHasIncidents(const QModelIndex &function, IncidentType type);
|
||||
};
|
||||
|
||||
class QTestOutputPane : public QObject,
|
||||
public Core::IOutputPane
|
||||
class QTestOutputPane : public Core::IOutputPane
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Core::IOutputPane)
|
||||
//Q_INTERFACES(Core::IOutputPane)
|
||||
public:
|
||||
QTestOutputPane(QTestLibPlugin *plugin);
|
||||
|
||||
@@ -147,10 +148,9 @@ private:
|
||||
class QTestOutputWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QTestOutputWidget(QStandardItemModel *model,
|
||||
Core::ICore *iCore,
|
||||
QWidget *parent);
|
||||
QTestOutputWidget(QStandardItemModel *model, QWidget *parent);
|
||||
|
||||
void expand();
|
||||
|
||||
@@ -159,7 +159,6 @@ private Q_SLOTS:
|
||||
void gotoLocation(QModelIndex index);
|
||||
|
||||
private:
|
||||
Core::ICore *m_coreInterface;
|
||||
QStandardItemModel *m_model;
|
||||
QTreeView *m_resultsView;
|
||||
QComboBox *m_filterCombo;
|
||||
@@ -181,10 +180,6 @@ public:
|
||||
bool init(ExtensionSystem::PluginManagerInterface *app, QString *error_message);
|
||||
void extensionsInitialized();
|
||||
|
||||
inline Core::ICore *coreInterface() const {
|
||||
return m_core;
|
||||
}
|
||||
|
||||
// IApplicationOutput
|
||||
virtual void clear();
|
||||
virtual void appendOutput(const QString &out);
|
||||
@@ -195,7 +190,6 @@ private slots:
|
||||
|
||||
private:
|
||||
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
|
||||
Core::ICore *m_core;
|
||||
QString m_outputFile;
|
||||
QString m_projectDirectory;
|
||||
QTestOutputPane *m_outputPane;
|
||||
|
||||
@@ -85,7 +85,7 @@ bool QtScriptEditorPlugin::initialize(const QStringList & /*arguments*/, QString
|
||||
m_context = m_scriptcontext;
|
||||
m_context << core->uniqueIDManager()->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
|
||||
|
||||
registerActions(core);
|
||||
registerActions();
|
||||
|
||||
m_editor = new QtScriptEditorFactory(m_context, this);
|
||||
addObject(m_editor);
|
||||
@@ -130,9 +130,9 @@ void QtScriptEditorPlugin::initializeEditor(QtScriptEditor::Internal::ScriptEdit
|
||||
editor->setDisplaySettings(settings->displaySettings());
|
||||
}
|
||||
|
||||
void QtScriptEditorPlugin::registerActions(Core::ICore *core)
|
||||
void QtScriptEditorPlugin::registerActions()
|
||||
{
|
||||
Core::ActionManager *am = core->actionManager();
|
||||
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
||||
Core::ActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT);
|
||||
|
||||
QAction *action = new QAction(this);
|
||||
|
||||
@@ -36,19 +36,13 @@
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
}
|
||||
|
||||
namespace TextEditor {
|
||||
class FontSettingsPage;
|
||||
class TextFileWizard;
|
||||
}
|
||||
} // namespace TextEditor
|
||||
|
||||
namespace QtScriptEditor {
|
||||
namespace Internal {
|
||||
|
||||
class QtScriptWizard;
|
||||
class QtScriptEditorFactory;
|
||||
class ScriptEditor;
|
||||
|
||||
@@ -60,14 +54,14 @@ public:
|
||||
QtScriptEditorPlugin();
|
||||
virtual ~QtScriptEditorPlugin();
|
||||
|
||||
//Plugin
|
||||
bool initialize(const QStringList &arguments, QString *error_message = 0);
|
||||
// IPlugin
|
||||
bool initialize(const QStringList &arguments, QString *errorMessage = 0);
|
||||
void extensionsInitialized();
|
||||
|
||||
static void initializeEditor(ScriptEditor *editor);
|
||||
|
||||
private:
|
||||
void registerActions(Core::ICore *core);
|
||||
void registerActions();
|
||||
|
||||
static QtScriptEditorPlugin *m_instance;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ QuickOpenPlugin::~QuickOpenPlugin()
|
||||
bool QuickOpenPlugin::initialize(const QStringList &, QString *)
|
||||
{
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
m_settingsPage = new SettingsPage(core, this);
|
||||
m_settingsPage = new SettingsPage(this);
|
||||
addObject(m_settingsPage);
|
||||
|
||||
m_quickOpenToolWindow = new QuickOpenToolWindow(this);
|
||||
|
||||
@@ -45,8 +45,8 @@ Q_DECLARE_METATYPE(QuickOpen::IQuickOpenFilter*)
|
||||
using namespace QuickOpen;
|
||||
using namespace QuickOpen::Internal;
|
||||
|
||||
SettingsPage::SettingsPage(Core::ICore *core, QuickOpenPlugin *plugin)
|
||||
: m_core(core), m_plugin(plugin), m_page(0)
|
||||
SettingsPage::SettingsPage(QuickOpenPlugin *plugin)
|
||||
: m_plugin(plugin), m_page(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class SettingsPage : public Core::IOptionsPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SettingsPage(Core::ICore *core, QuickOpenPlugin *plugin);
|
||||
explicit SettingsPage(QuickOpenPlugin *plugin);
|
||||
QString name() const { return tr(Constants::FILTER_OPTIONS_PAGE); }
|
||||
QString category() const { return Constants::QUICKOPEN_CATEGORY; }
|
||||
QString trCategory() const { return tr(Constants::QUICKOPEN_CATEGORY); }
|
||||
@@ -82,7 +82,6 @@ private:
|
||||
void requestRefresh();
|
||||
|
||||
Ui::SettingsWidget m_ui;
|
||||
Core::ICore *m_core;
|
||||
QuickOpenPlugin *m_plugin;
|
||||
QPointer<QWidget> m_page;
|
||||
QList<IQuickOpenFilter *> m_filters;
|
||||
|
||||
@@ -132,9 +132,9 @@ static inline QString debugCodec(const QTextCodec *c)
|
||||
return c ? QString::fromAscii(c->name()) : QString::fromAscii("Null codec");
|
||||
}
|
||||
|
||||
inline Core::IEditor* locateEditor(const Core::ICore *core, const char *property, const QString &entry)
|
||||
Core::IEditor* locateEditor(const char *property, const QString &entry)
|
||||
{
|
||||
foreach (Core::IEditor *ed, core->editorManager()->openedEditors())
|
||||
foreach (Core::IEditor *ed, Core::ICore::instance()->editorManager()->openedEditors())
|
||||
if (ed->property(property).toString() == entry)
|
||||
return ed;
|
||||
return 0;
|
||||
@@ -164,7 +164,6 @@ StatusList parseStatusOutput(const QString &output)
|
||||
}
|
||||
|
||||
// ------------- SubversionPlugin
|
||||
Core::ICore *SubversionPlugin::m_coreInstance = 0;
|
||||
SubversionPlugin *SubversionPlugin::m_subversionPluginInstance = 0;
|
||||
|
||||
SubversionPlugin::SubversionPlugin() :
|
||||
@@ -261,15 +260,15 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
using namespace ExtensionSystem;
|
||||
|
||||
m_subversionPluginInstance = this;
|
||||
m_coreInstance = Core::ICore::instance();
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
|
||||
if (!m_coreInstance->mimeDatabase()->addMimeTypes(QLatin1String(":/trolltech.subversion/Subversion.mimetypes.xml"), errorMessage))
|
||||
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":/trolltech.subversion/Subversion.mimetypes.xml"), errorMessage))
|
||||
return false;
|
||||
|
||||
m_versionControl = new SubversionControl(this);
|
||||
addObject(m_versionControl);
|
||||
|
||||
if (QSettings *settings = m_coreInstance->settings())
|
||||
if (QSettings *settings = core->settings())
|
||||
m_settings.fromSettings(settings);
|
||||
|
||||
m_coreListener = new CoreListener(this);
|
||||
@@ -293,7 +292,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
addObject(m_subversionOutputWindow);
|
||||
|
||||
//register actions
|
||||
Core::ActionManager *ami = m_coreInstance->actionManager();
|
||||
Core::ActionManager *ami = core->actionManager();
|
||||
Core::ActionContainer *toolsContainer = ami->actionContainer(M_TOOLS);
|
||||
|
||||
Core::ActionContainer *subversionMenu =
|
||||
@@ -306,7 +305,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
}
|
||||
|
||||
QList<int> globalcontext;
|
||||
globalcontext << m_coreInstance->uniqueIDManager()->uniqueIdentifier(C_GLOBAL);
|
||||
globalcontext << core->uniqueIDManager()->uniqueIdentifier(C_GLOBAL);
|
||||
|
||||
Core::Command *command;
|
||||
m_addAction = new QAction(tr("Add"), this);
|
||||
@@ -408,7 +407,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
|
||||
// Actions of the submit editor
|
||||
QList<int> svncommitcontext;
|
||||
svncommitcontext << m_coreInstance->uniqueIDManager()->uniqueIdentifier(Constants::SUBVERSIONCOMMITEDITOR);
|
||||
svncommitcontext << Core::ICore::instance()->uniqueIDManager()->uniqueIdentifier(Constants::SUBVERSIONCOMMITEDITOR);
|
||||
|
||||
m_submitCurrentLogAction = new QAction(VCSBase::VCSBaseSubmitEditor::submitIcon(), tr("Commit"), this);
|
||||
command = ami->registerAction(m_submitCurrentLogAction, Constants::SUBMIT_CURRENT, svncommitcontext);
|
||||
@@ -423,7 +422,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
m_submitRedoAction = new QAction(tr("&Redo"), this);
|
||||
command = ami->registerAction(m_submitRedoAction, Core::Constants::REDO, svncommitcontext);
|
||||
|
||||
connect(m_coreInstance, SIGNAL(contextChanged(Core::IContext *)), this, SLOT(updateActions()));
|
||||
connect(Core::ICore::instance(), SIGNAL(contextChanged(Core::IContext *)), this, SLOT(updateActions()));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -461,7 +460,7 @@ bool SubversionPlugin::editorAboutToClose(Core::IEditor *iEditor)
|
||||
|
||||
// Prompt user.
|
||||
const QMessageBox::StandardButton answer = QMessageBox::question(
|
||||
m_coreInstance->mainWindow(), tr("Closing Subversion Editor"),
|
||||
Core::ICore::instance()->mainWindow(), tr("Closing Subversion Editor"),
|
||||
tr("Do you want to commit the change?"),
|
||||
QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel, QMessageBox::Yes);
|
||||
switch (answer) {
|
||||
@@ -477,9 +476,9 @@ bool SubversionPlugin::editorAboutToClose(Core::IEditor *iEditor)
|
||||
const QStringList fileList = editor->checkedFiles();
|
||||
if (!fileList.empty()) {
|
||||
// get message & commit
|
||||
m_coreInstance->fileManager()->blockFileChange(fileIFace);
|
||||
Core::ICore::instance()->fileManager()->blockFileChange(fileIFace);
|
||||
fileIFace->save();
|
||||
m_coreInstance->fileManager()->unblockFileChange(fileIFace);
|
||||
Core::ICore::instance()->fileManager()->unblockFileChange(fileIFace);
|
||||
commit(m_changeTmpFile->fileName(), fileList);
|
||||
}
|
||||
cleanChangeTmpFile();
|
||||
@@ -512,9 +511,9 @@ void SubversionPlugin::svnDiff(const QStringList &files, QString diffname)
|
||||
// the common usage pattern of continuously changing and diffing a file
|
||||
if (files.count() == 1) {
|
||||
// Show in the same editor if diff has been executed before
|
||||
if (Core::IEditor *editor = locateEditor(m_coreInstance, "originalFileName", files.front())) {
|
||||
if (Core::IEditor *editor = locateEditor("originalFileName", files.front())) {
|
||||
editor->createNew(response.stdOut);
|
||||
m_coreInstance->editorManager()->setCurrentEditor(editor);
|
||||
Core::ICore::instance()->editorManager()->setCurrentEditor(editor);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -526,7 +525,7 @@ void SubversionPlugin::svnDiff(const QStringList &files, QString diffname)
|
||||
|
||||
SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QString &fileName)
|
||||
{
|
||||
Core::IEditor *editor = m_coreInstance->editorManager()->openEditor(fileName, QLatin1String(Constants::SUBVERSIONCOMMITEDITOR_KIND));
|
||||
Core::IEditor *editor = Core::ICore::instance()->editorManager()->openEditor(fileName, QLatin1String(Constants::SUBVERSIONCOMMITEDITOR_KIND));
|
||||
SubversionSubmitEditor *submitEditor = qobject_cast<SubversionSubmitEditor*>(editor);
|
||||
QTC_ASSERT(submitEditor, /**/);
|
||||
submitEditor->registerActions(m_submitUndoAction, m_submitRedoAction, m_submitCurrentLogAction, m_submitDiffAction);
|
||||
@@ -597,7 +596,7 @@ void SubversionPlugin::revertCurrentFile()
|
||||
QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
|
||||
return;
|
||||
|
||||
Core::FileManager *fm = m_coreInstance->fileManager();
|
||||
Core::FileManager *fm = Core::ICore::instance()->fileManager();
|
||||
QList<Core::IFile *> files = fm->managedFiles(file);
|
||||
foreach (Core::IFile *file, files)
|
||||
fm->blockFileChange(file);
|
||||
@@ -775,9 +774,9 @@ void SubversionPlugin::filelog(const QString &file)
|
||||
// Re-use an existing view if possible to support
|
||||
// the common usage pattern of continuously changing and diffing a file
|
||||
|
||||
if (Core::IEditor *editor = locateEditor(m_coreInstance, "logFileName", file)) {
|
||||
if (Core::IEditor *editor = locateEditor("logFileName", file)) {
|
||||
editor->createNew(response.stdOut);
|
||||
m_coreInstance->editorManager()->setCurrentEditor(editor);
|
||||
Core::ICore::instance()->editorManager()->setCurrentEditor(editor);
|
||||
} else {
|
||||
const QString title = tr("svn log %1").arg(QFileInfo(file).fileName());
|
||||
Core::IEditor *newEditor = showOutputInEditor(title, response.stdOut, VCSBase::LogOutput, file, codec);
|
||||
@@ -818,9 +817,9 @@ void SubversionPlugin::annotate(const QString &file)
|
||||
// Re-use an existing view if possible to support
|
||||
// the common usage pattern of continuously changing and diffing a file
|
||||
|
||||
if (Core::IEditor *editor = locateEditor(m_coreInstance, "annotateFileName", file)) {
|
||||
if (Core::IEditor *editor = locateEditor("annotateFileName", file)) {
|
||||
editor->createNew(response.stdOut);
|
||||
m_coreInstance->editorManager()->setCurrentEditor(editor);
|
||||
Core::ICore::instance()->editorManager()->setCurrentEditor(editor);
|
||||
} else {
|
||||
const QString title = tr("svn annotate %1").arg(QFileInfo(file).fileName());
|
||||
Core::IEditor *newEditor = showOutputInEditor(title, response.stdOut, VCSBase::AnnotateOutput, file, codec);
|
||||
@@ -872,9 +871,9 @@ void SubversionPlugin::describe(const QString &source, const QString &changeNr)
|
||||
// Re-use an existing view if possible to support
|
||||
// the common usage pattern of continuously changing and diffing a file
|
||||
const QString id = diffArg + source;
|
||||
if (Core::IEditor *editor = locateEditor(m_coreInstance, "describeChange", id)) {
|
||||
if (Core::IEditor *editor = locateEditor("describeChange", id)) {
|
||||
editor->createNew(response.stdOut);
|
||||
m_coreInstance->editorManager()->setCurrentEditor(editor);
|
||||
Core::ICore::instance()->editorManager()->setCurrentEditor(editor);
|
||||
} else {
|
||||
const QString title = tr("svn describe %1#%2").arg(QFileInfo(source).fileName(), changeNr);
|
||||
Core::IEditor *newEditor = showOutputInEditor(title, response.stdOut, VCSBase::DiffOutput, source, codec);
|
||||
@@ -884,13 +883,13 @@ void SubversionPlugin::describe(const QString &source, const QString &changeNr)
|
||||
|
||||
void SubversionPlugin::submitCurrentLog()
|
||||
{
|
||||
m_coreInstance->editorManager()->closeEditors(QList<Core::IEditor*>()
|
||||
<< m_coreInstance->editorManager()->currentEditor());
|
||||
Core::ICore::instance()->editorManager()->closeEditors(QList<Core::IEditor*>()
|
||||
<< Core::ICore::instance()->editorManager()->currentEditor());
|
||||
}
|
||||
|
||||
QString SubversionPlugin::currentFileName() const
|
||||
{
|
||||
const QString fileName = m_coreInstance->fileManager()->currentFile();
|
||||
const QString fileName = Core::ICore::instance()->fileManager()->currentFile();
|
||||
if (!fileName.isEmpty()) {
|
||||
const QFileInfo fi(fileName);
|
||||
if (fi.exists())
|
||||
@@ -991,7 +990,7 @@ Core::IEditor * SubversionPlugin::showOutputInEditor(const QString& title, const
|
||||
if (Subversion::Constants::debug)
|
||||
qDebug() << "SubversionPlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||
QString s = title;
|
||||
Core::IEditor *ediface = m_coreInstance->editorManager()->newFile(kind, &s, output.toLocal8Bit());
|
||||
Core::IEditor *ediface = Core::ICore::instance()->editorManager()->newFile(kind, &s, output.toLocal8Bit());
|
||||
SubversionEditor *e = qobject_cast<SubversionEditor*>(ediface->widget());
|
||||
if (!e)
|
||||
return 0;
|
||||
@@ -1013,7 +1012,7 @@ void SubversionPlugin::setSettings(const SubversionSettings &s)
|
||||
{
|
||||
if (s != m_settings) {
|
||||
m_settings = s;
|
||||
if (QSettings *settings = m_coreInstance->settings())
|
||||
if (QSettings *settings = Core::ICore::instance()->settings())
|
||||
m_settings.toSettings(settings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ class QTextCodec;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
class IEditorFactory;
|
||||
class IVersionControl;
|
||||
}
|
||||
@@ -189,7 +188,6 @@ private:
|
||||
static const char * const STATUS;
|
||||
static const char * const UPDATE;
|
||||
|
||||
static Core::ICore *m_coreInstance;
|
||||
static SubversionPlugin *m_subversionPluginInstance;
|
||||
|
||||
friend class SubversionOutputWindow;
|
||||
|
||||
@@ -46,11 +46,8 @@ class QSyntaxHighlighter;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
namespace Core { class ICore; }
|
||||
|
||||
namespace TextEditor {
|
||||
|
||||
|
||||
class DocumentMarker : public ITextMarkable
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -69,9 +66,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
class TEXTEDITOR_EXPORT BaseTextDocument
|
||||
: public Core::IFile
|
||||
class TEXTEDITOR_EXPORT BaseTextDocument : public Core::IFile
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -133,7 +128,6 @@ private:
|
||||
QString m_mimeType;
|
||||
StorageSettings m_storageSettings;
|
||||
TabSettings m_tabSettings;
|
||||
Core::ICore *m_core;
|
||||
QTextDocument *m_document;
|
||||
DocumentMarker *m_documentMarker;
|
||||
QSyntaxHighlighter *m_highlighter;
|
||||
|
||||
Reference in New Issue
Block a user