forked from qt-creator/qt-creator
Designer: Use static pattern for FormEditorW singleton
Change-Id: Icf4a0135d9bc8441d468fd77abe29adcee677bb9 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "formwindowfile.h"
|
||||
#include "designerconstants.h"
|
||||
#include "resourcehandler.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -60,6 +61,10 @@ FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *pare
|
||||
connect(m_formWindow->commandHistory(), SIGNAL(indexChanged(int)),
|
||||
this, SLOT(setShouldAutoSave()));
|
||||
connect(m_formWindow, SIGNAL(changed()), SLOT(updateIsModified()));
|
||||
|
||||
m_resourceHandler = new ResourceHandler(form);
|
||||
connect(this, SIGNAL(filePathChanged(QString,QString)),
|
||||
m_resourceHandler, SLOT(updateResources()));
|
||||
}
|
||||
|
||||
bool FormWindowFile::save(QString *errorString, const QString &name, bool autoSave)
|
||||
@@ -217,6 +222,11 @@ QString FormWindowFile::formWindowContents() const
|
||||
return m_formWindow->contents();
|
||||
}
|
||||
|
||||
ResourceHandler *FormWindowFile::resourceHandler() const
|
||||
{
|
||||
return m_resourceHandler;
|
||||
}
|
||||
|
||||
void FormWindowFile::slotFormWindowRemoved(QDesignerFormWindowInterface *w)
|
||||
{
|
||||
// Release formwindow as soon as the FormWindowManager removes
|
||||
|
||||
Reference in New Issue
Block a user