summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-09-15 11:45:27 +0200
committerhjk <qthjk@ovi.com>2011-09-15 13:33:33 +0200
commit922058cdf811c3585a67ee9d9ecb6149ebbc40e1 (patch)
tree59a4c379a7d470f4234466a971479e56cb6e77f5 /src/plugins
parent940fb1c4ab1b81f49842df142bcc02b5ed470b9f (diff)
downloadqt-creator-922058cdf811c3585a67ee9d9ecb6149ebbc40e1.tar.gz
qmldesigner: code style
Change-Id: I4088695312de5ea526578c6b901a79a9662797b8 Reviewed-on: http://codereview.qt-project.org/4961 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp326
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocumentcontroller.h2
-rw-r--r--src/plugins/qmldesigner/components/integration/integrationcore.cpp6
-rw-r--r--src/plugins/qmldesigner/components/integration/integrationcore.h2
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp148
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h2
-rw-r--r--src/plugins/qmldesigner/components/pluginmanager/pluginmanager.cpp14
-rw-r--r--src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h2
-rw-r--r--src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h2
-rw-r--r--src/plugins/qmldesigner/designercore/include/model.h2
-rw-r--r--src/plugins/qmldesigner/designercore/include/subcomponentmanager.h2
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp32
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp34
-rw-r--r--src/plugins/qmldesigner/designercore/model/abstractview.cpp56
-rw-r--r--src/plugins/qmldesigner/designercore/model/bindingproperty.cpp8
-rw-r--r--src/plugins/qmldesigner/designercore/model/model.cpp62
-rw-r--r--src/plugins/qmldesigner/designercore/model/modelnode.cpp14
-rw-r--r--src/plugins/qmldesigner/designercore/model/nodeabstractproperty.cpp6
-rw-r--r--src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp2
-rw-r--r--src/plugins/qmldesigner/designercore/model/nodeproperty.cpp4
-rw-r--r--src/plugins/qmldesigner/designercore/model/variantproperty.cpp8
-rw-r--r--src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.cpp14
-rw-r--r--src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h2
23 files changed, 375 insertions, 375 deletions
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
index cb3c8977d6..6c440383bf 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
@@ -136,11 +136,11 @@ DesignDocumentController *DesignDocumentController::m_this = 0;
*/
DesignDocumentController::DesignDocumentController(QObject *parent) :
QObject(parent),
- m_d(new DesignDocumentControllerPrivate)
+ d(new DesignDocumentControllerPrivate)
{
m_this = this;
- m_d->documentLoaded = false;
- m_d->syncBlocked = false;
+ d->documentLoaded = false;
+ d->syncBlocked = false;
ProjectExplorer::ProjectExplorerPlugin *projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
connect(projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), this, SLOT(activeQtVersionChanged()));
@@ -150,50 +150,50 @@ DesignDocumentController::DesignDocumentController(QObject *parent) :
DesignDocumentController::~DesignDocumentController()
{
m_this = 0;
- delete m_d->model.data();
- delete m_d->subComponentModel.data();
+ delete d->model.data();
+ delete d->subComponentModel.data();
- delete m_d->rewriterView.data();
+ delete d->rewriterView.data();
- if (m_d->componentTextModifier) //componentTextModifier might not be created
- delete m_d->componentTextModifier;
+ if (d->componentTextModifier) //componentTextModifier might not be created
+ delete d->componentTextModifier;
- delete m_d;
+ delete d;
}
Model *DesignDocumentController::model() const
{
- return m_d->model.data();
+ return d->model.data();
}
Model *DesignDocumentController::masterModel() const
{
- return m_d->masterModel.data();
+ return d->masterModel.data();
}
void DesignDocumentController::detachNodeInstanceView()
{
- if (m_d->nodeInstanceView)
- model()->detachView(m_d->nodeInstanceView.data());
+ if (d->nodeInstanceView)
+ model()->detachView(d->nodeInstanceView.data());
}
void DesignDocumentController::attachNodeInstanceView()
{
- if (m_d->nodeInstanceView) {
- model()->attachView(m_d->nodeInstanceView.data());
+ if (d->nodeInstanceView) {
+ model()->attachView(d->nodeInstanceView.data());
}
- if (m_d->formEditorView) {
- m_d->formEditorView->resetView();
+ if (d->formEditorView) {
+ d->formEditorView->resetView();
}
}
void DesignDocumentController::changeToMasterModel()
{
- m_d->model->detachView(m_d->rewriterView.data());
- m_d->rewriterView->setTextModifier(m_d->textModifier);
- m_d->model = m_d->masterModel;
- m_d->model->attachView(m_d->rewriterView.data());
+ d->model->detachView(d->rewriterView.data());
+ d->rewriterView->setTextModifier(d->textModifier);
+ d->model = d->masterModel;
+ d->model->attachView(d->rewriterView.data());
}
QWidget *DesignDocumentController::centralWidget() const
@@ -203,7 +203,7 @@ QWidget *DesignDocumentController::centralWidget() const
QString DesignDocumentController::pathToQt() const
{
- QtSupport::BaseQtVersion *activeQtVersion = QtSupport::QtVersionManager::instance()->version(m_d->qt_versionId);
+ QtSupport::BaseQtVersion *activeQtVersion = QtSupport::QtVersionManager::instance()->version(d->qt_versionId);
if (activeQtVersion && (activeQtVersion->qtVersion().majorVersion > 3)
&& (activeQtVersion->supportsTargetId(Qt4ProjectManager::Constants::QT_SIMULATOR_TARGET_ID)
|| activeQtVersion->supportsTargetId(Qt4ProjectManager::Constants::DESKTOP_TARGET_ID)))
@@ -216,7 +216,7 @@ QString DesignDocumentController::pathToQt() const
*/
bool DesignDocumentController::isModelSyncBlocked() const
{
- return m_d->syncBlocked;
+ return d->syncBlocked;
}
/*!
@@ -228,35 +228,35 @@ bool DesignDocumentController::isModelSyncBlocked() const
*/
void DesignDocumentController::blockModelSync(bool block)
{
- if (m_d->syncBlocked == block)
+ if (d->syncBlocked == block)
return;
- m_d->syncBlocked = block;
+ d->syncBlocked = block;
- if (m_d->textModifier) {
- if (m_d->syncBlocked) {
+ if (d->textModifier) {
+ if (d->syncBlocked) {
detachNodeInstanceView();
- m_d->textModifier->deactivateChangeSignals();
+ d->textModifier->deactivateChangeSignals();
} else {
activeQtVersionChanged();
changeToMasterModel();
QmlModelState state;
//We go back to base state (and back again) to avoid side effects from text editing.
- if (m_d->statesEditorView && m_d->statesEditorView->model()) {
- state = m_d->statesEditorView->currentState();
- m_d->statesEditorView->setCurrentState(m_d->statesEditorView->baseState());
+ if (d->statesEditorView && d->statesEditorView->model()) {
+ state = d->statesEditorView->currentState();
+ d->statesEditorView->setCurrentState(d->statesEditorView->baseState());
}
- m_d->textModifier->reactivateChangeSignals();
+ d->textModifier->reactivateChangeSignals();
- if (state.isValid() && m_d->statesEditorView)
- m_d->statesEditorView->setCurrentState(state);
+ if (state.isValid() && d->statesEditorView)
+ d->statesEditorView->setCurrentState(state);
attachNodeInstanceView();
- if (m_d->propertyEditorView)
- m_d->propertyEditorView->resetView();
- if (m_d->formEditorView)
- m_d->formEditorView->resetView();
+ if (d->propertyEditorView)
+ d->propertyEditorView->resetView();
+ if (d->formEditorView)
+ d->formEditorView->resetView();
}
}
}
@@ -266,43 +266,43 @@ void DesignDocumentController::blockModelSync(bool block)
*/
QList<RewriterView::Error> DesignDocumentController::qmlErrors() const
{
- return m_d->rewriterView->errors();
+ return d->rewriterView->errors();
}
void DesignDocumentController::setItemLibraryView(ItemLibraryView* itemLibraryView)
{
- m_d->itemLibraryView = itemLibraryView;
+ d->itemLibraryView = itemLibraryView;
}
void DesignDocumentController::setNavigator(NavigatorView* navigatorView)
{
- m_d->navigator = navigatorView;
+ d->navigator = navigatorView;
}
void DesignDocumentController::setPropertyEditorView(PropertyEditor *propertyEditor)
{
- m_d->propertyEditorView = propertyEditor;
+ d->propertyEditorView = propertyEditor;
}
void DesignDocumentController::setStatesEditorView(StatesEditorView* statesEditorView)
{
- m_d->statesEditorView = statesEditorView;
+ d->statesEditorView = statesEditorView;
}
void DesignDocumentController::setFormEditorView(FormEditorView *formEditorView)
{
- m_d->formEditorView = formEditorView;
+ d->formEditorView = formEditorView;
}
void DesignDocumentController::setNodeInstanceView(NodeInstanceView *nodeInstanceView)
{
- m_d->nodeInstanceView = nodeInstanceView;
+ d->nodeInstanceView = nodeInstanceView;
}
void DesignDocumentController::setComponentView(ComponentView *componentView)
{
- m_d->componentView = componentView;
- connect(m_d->componentView->action(), SIGNAL(currentComponentChanged(ModelNode)), SLOT(changeCurrentModelTo(ModelNode)));
+ d->componentView = componentView;
+ connect(d->componentView->action(), SIGNAL(currentComponentChanged(ModelNode)), SLOT(changeCurrentModelTo(ModelNode)));
}
DesignDocumentController *DesignDocumentController::instance()
@@ -320,24 +320,24 @@ QString DesignDocumentController::displayName() const
QString DesignDocumentController::fileName() const
{
- return m_d->fileName;
+ return d->fileName;
}
void DesignDocumentController::setFileName(const QString &fileName)
{
- m_d->fileName = fileName;
+ d->fileName = fileName;
if (QFileInfo(fileName).exists()) {
- m_d->searchPath = QUrl::fromLocalFile(fileName);
+ d->searchPath = QUrl::fromLocalFile(fileName);
} else {
- m_d->searchPath = QUrl(fileName);
+ d->searchPath = QUrl(fileName);
}
- if (m_d->model)
- m_d->model->setFileUrl(m_d->searchPath);
+ if (d->model)
+ d->model->setFileUrl(d->searchPath);
- if (m_d->itemLibraryView)
- m_d->itemLibraryView->widget()->setResourcePath(QFileInfo(fileName).absolutePath());
+ if (d->itemLibraryView)
+ d->itemLibraryView->widget()->setResourcePath(QFileInfo(fileName).absolutePath());
emit displayNameChanged(displayName());
}
@@ -345,7 +345,7 @@ QList<RewriterView::Error> DesignDocumentController::loadMaster(QPlainTextEdit *
{
Q_CHECK_PTR(edit);
- m_d->textEdit = edit;
+ d->textEdit = edit;
connect(edit, SIGNAL(undoAvailable(bool)),
this, SIGNAL(undoAvailable(bool)));
@@ -354,53 +354,53 @@ QList<RewriterView::Error> DesignDocumentController::loadMaster(QPlainTextEdit *
connect(edit, SIGNAL(modificationChanged(bool)),
this, SIGNAL(dirtyStateChanged(bool)));
- m_d->textModifier = new BaseTextEditModifier(dynamic_cast<TextEditor::BaseTextEditorWidget*>(m_d->textEdit.data()));
+ d->textModifier = new BaseTextEditModifier(dynamic_cast<TextEditor::BaseTextEditorWidget*>(d->textEdit.data()));
- m_d->componentTextModifier = 0;
+ d->componentTextModifier = 0;
- //m_d->masterModel = Model::create(m_d->textModifier, m_d->searchPath, errors);
+ //d->masterModel = Model::create(d->textModifier, d->searchPath, errors);
- m_d->masterModel = Model::create("QtQuick.Rectangle", 1, 0);
+ d->masterModel = Model::create("QtQuick.Rectangle", 1, 0);
#if defined(VIEWLOGGER)
- m_d->viewLogger = new Internal::ViewLogger(m_d->model.data());
- m_d->masterModel->attachView(m_d->viewLogger.data());
+ d->viewLogger = new Internal::ViewLogger(d->model.data());
+ d->masterModel->attachView(d->viewLogger.data());
#endif
- m_d->masterModel->setFileUrl(m_d->searchPath);
+ d->masterModel->setFileUrl(d->searchPath);
- m_d->subComponentModel = Model::create("QtQuick.Rectangle", 1, 0);
- m_d->subComponentModel->setFileUrl(m_d->searchPath);
+ d->subComponentModel = Model::create("QtQuick.Rectangle", 1, 0);
+ d->subComponentModel->setFileUrl(d->searchPath);
- m_d->rewriterView = new RewriterView(RewriterView::Amend, m_d->masterModel.data());
- m_d->rewriterView->setTextModifier( m_d->textModifier);
- connect(m_d->rewriterView.data(), SIGNAL(errorsChanged(const QList<RewriterView::Error> &)),
+ d->rewriterView = new RewriterView(RewriterView::Amend, d->masterModel.data());
+ d->rewriterView->setTextModifier( d->textModifier);
+ connect(d->rewriterView.data(), SIGNAL(errorsChanged(const QList<RewriterView::Error> &)),
this, SIGNAL(qmlErrorsChanged(const QList<RewriterView::Error> &)));
- m_d->masterModel->attachView(m_d->rewriterView.data());
- m_d->model = m_d->masterModel;
+ d->masterModel->attachView(d->rewriterView.data());
+ d->model = d->masterModel;
- m_d->subComponentManager = new SubComponentManager(m_d->masterModel.data(), this);
- m_d->subComponentManager->update(m_d->searchPath, m_d->model->imports());
+ d->subComponentManager = new SubComponentManager(d->masterModel.data(), this);
+ d->subComponentManager->update(d->searchPath, d->model->imports());
loadCurrentModel();
- m_d->masterModel->attachView(m_d->componentView.data());
+ d->masterModel->attachView(d->componentView.data());
- return m_d->rewriterView->errors();
+ return d->rewriterView->errors();
}
void DesignDocumentController::changeCurrentModelTo(const ModelNode &componentNode)
{
- Q_ASSERT(m_d->masterModel);
- QWeakPointer<Model> oldModel = m_d->model;
+ Q_ASSERT(d->masterModel);
+ QWeakPointer<Model> oldModel = d->model;
Q_ASSERT(oldModel.data());
- if (m_d->model == m_d->subComponentModel) {
+ if (d->model == d->subComponentModel) {
changeToMasterModel();
}
- QString componentText = m_d->rewriterView->extractText(QList<ModelNode>() << componentNode).value(componentNode);
+ QString componentText = d->rewriterView->extractText(QList<ModelNode>() << componentNode).value(componentNode);
if (componentText.isEmpty())
return;
@@ -411,57 +411,57 @@ void DesignDocumentController::changeCurrentModelTo(const ModelNode &componentNo
}
if (!componentNode.isRootNode()) {
- Q_ASSERT(m_d->model == m_d->masterModel);
+ Q_ASSERT(d->model == d->masterModel);
Q_ASSERT(componentNode.isValid());
//change to subcomponent model
ModelNode rootModelNode = componentNode.view()->rootModelNode();
Q_ASSERT(rootModelNode.isValid());
- if (m_d->componentTextModifier)
- delete m_d->componentTextModifier;
+ if (d->componentTextModifier)
+ delete d->componentTextModifier;
int componentStartOffset;
int componentEndOffset;
- int rootStartOffset = m_d->rewriterView->nodeOffset(rootModelNode);
+ int rootStartOffset = d->rewriterView->nodeOffset(rootModelNode);
if (explicitComponent) { //the component is explciit we have to find the first definition inside
- componentStartOffset = m_d->rewriterView->firstDefinitionInsideOffset(componentNode);
- componentEndOffset = componentStartOffset + m_d->rewriterView->firstDefinitionInsideLength(componentNode);
+ componentStartOffset = d->rewriterView->firstDefinitionInsideOffset(componentNode);
+ componentEndOffset = componentStartOffset + d->rewriterView->firstDefinitionInsideLength(componentNode);
} else { //the component is implicit
- componentStartOffset = m_d->rewriterView->nodeOffset(componentNode);
- componentEndOffset = componentStartOffset + m_d->rewriterView->nodeLength(componentNode);
+ componentStartOffset = d->rewriterView->nodeOffset(componentNode);
+ componentEndOffset = componentStartOffset + d->rewriterView->nodeLength(componentNode);
}
- m_d->componentTextModifier = new ComponentTextModifier (m_d->textModifier, componentStartOffset, componentEndOffset, rootStartOffset);
+ d->componentTextModifier = new ComponentTextModifier (d->textModifier, componentStartOffset, componentEndOffset, rootStartOffset);
- m_d->model->detachView(m_d->rewriterView.data());
+ d->model->detachView(d->rewriterView.data());
- m_d->rewriterView->setTextModifier(m_d->componentTextModifier);
+ d->rewriterView->setTextModifier(d->componentTextModifier);
- m_d->subComponentModel->attachView(m_d->rewriterView.data());
+ d->subComponentModel->attachView(d->rewriterView.data());
- Q_ASSERT(m_d->rewriterView->rootModelNode().isValid());
+ Q_ASSERT(d->rewriterView->rootModelNode().isValid());
- m_d->model = m_d->subComponentModel;
+ d->model = d->subComponentModel;
}
- Q_ASSERT(m_d->masterModel);
- Q_ASSERT(m_d->model);
+ Q_ASSERT(d->masterModel);
+ Q_ASSERT(d->model);
loadCurrentModel();
- m_d->componentView->setComponentNode(componentNode);
+ d->componentView->setComponentNode(componentNode);
}
void DesignDocumentController::goIntoComponent()
{
- if (!m_d->model)
+ if (!d->model)
return;
QList<ModelNode> selectedNodes;
- if (m_d->formEditorView)
- selectedNodes = m_d->formEditorView->selectedModelNodes();
+ if (d->formEditorView)
+ selectedNodes = d->formEditorView->selectedModelNodes();
if (selectedNodes.count() == 1)
ModelNodeAction::goIntoComponent(selectedNodes.first());
@@ -471,30 +471,30 @@ void DesignDocumentController::loadCurrentModel()
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
- Q_ASSERT(m_d->masterModel);
- Q_ASSERT(m_d->model);
- m_d->model->setMasterModel(m_d->masterModel.data());
+ Q_ASSERT(d->masterModel);
+ Q_ASSERT(d->model);
+ d->model->setMasterModel(d->masterModel.data());
- m_d->nodeInstanceView->setPathToQt(pathToQt());
- m_d->model->attachView(m_d->nodeInstanceView.data());
- m_d->model->attachView(m_d->navigator.data());
- m_d->itemLibraryView->widget()->setResourcePath(QFileInfo(m_d->fileName).absolutePath());
+ d->nodeInstanceView->setPathToQt(pathToQt());
+ d->model->attachView(d->nodeInstanceView.data());
+ d->model->attachView(d->navigator.data());
+ d->itemLibraryView->widget()->setResourcePath(QFileInfo(d->fileName).absolutePath());
- connect(m_d->itemLibraryView->widget(), SIGNAL(itemActivated(const QString&)), m_d->formEditorView.data(), SLOT(activateItemCreator(const QString&)));
+ connect(d->itemLibraryView->widget(), SIGNAL(itemActivated(const QString&)), d->formEditorView.data(), SLOT(activateItemCreator(const QString&)));
- m_d->model->attachView(m_d->formEditorView.data());
- m_d->model->attachView(m_d->itemLibraryView.data());
+ d->model->attachView(d->formEditorView.data());
+ d->model->attachView(d->itemLibraryView.data());
- if (!m_d->textEdit->parent()) // hack to prevent changing owner of external text edit
- m_d->stackedWidget->addWidget(m_d->textEdit.data());
+ if (!d->textEdit->parent()) // hack to prevent changing owner of external text edit
+ d->stackedWidget->addWidget(d->textEdit.data());
// Will call setCurrentState (formEditorView etc has to be constructed first)
- m_d->model->attachView(m_d->statesEditorView.data());
+ d->model->attachView(d->statesEditorView.data());
- m_d->model->attachView(m_d->propertyEditorView.data());
+ d->model->attachView(d->propertyEditorView.data());
- m_d->documentLoaded = true;
- Q_ASSERT(m_d->masterModel);
+ d->documentLoaded = true;
+ Q_ASSERT(d->masterModel);
QApplication::restoreOverrideCursor();
}
@@ -508,7 +508,7 @@ QList<RewriterView::Error> DesignDocumentController::loadMaster(const QByteArray
void DesignDocumentController::saveAs(QWidget *parent)
{
- QFileInfo oldFileInfo(m_d->fileName);
+ QFileInfo oldFileInfo(d->fileName);
XUIFileDialog::runSaveFileDialog(oldFileInfo.path(), parent, this, SLOT(doRealSaveAs(QString)));
}
@@ -540,8 +540,8 @@ void DesignDocumentController::doRealSaveAs(const QString &fileName)
bool DesignDocumentController::isDirty() const
{
- if (m_d->textEdit)
- return m_d->textEdit->document()->isModified();
+ if (d->textEdit)
+ return d->textEdit->document()->isModified();
else
return false;
}
@@ -549,33 +549,33 @@ bool DesignDocumentController::isDirty() const
bool DesignDocumentController::isUndoAvailable() const
{
- if (m_d->textEdit)
- return m_d->textEdit->document()->isUndoAvailable();
+ if (d->textEdit)
+ return d->textEdit->document()->isUndoAvailable();
return false;
}
bool DesignDocumentController::isRedoAvailable() const
{
- if (m_d->textEdit)
- return m_d->textEdit->document()->isRedoAvailable();
+ if (d->textEdit)
+ return d->textEdit->document()->isRedoAvailable();
return false;
}
void DesignDocumentController::close()
{
- m_d->documentLoaded = false;
+ d->documentLoaded = false;
emit designDocumentClosed();
}
void DesignDocumentController::deleteSelected()
{
- if (!m_d->model)
+ if (!d->model)
return;
try {
- if (m_d->formEditorView) {
- RewriterTransaction transaction(m_d->formEditorView.data());
- QList<ModelNode> toDelete = m_d->formEditorView->selectedModelNodes();
+ if (d->formEditorView) {
+ RewriterTransaction transaction(d->formEditorView.data());
+ QList<ModelNode> toDelete = d->formEditorView->selectedModelNodes();
foreach (ModelNode node, toDelete) {
if (node.isValid() && !node.isRootNode() && QmlObjectNode(node).isValid())
QmlObjectNode(node).destroy();
@@ -589,14 +589,14 @@ void DesignDocumentController::deleteSelected()
void DesignDocumentController::copySelected()
{
QScopedPointer<Model> model(Model::create("QtQuick.Rectangle", 1, 0, this->model()));
- model->setFileUrl(m_d->model->fileUrl());
- model->changeImports(m_d->model->imports(), QList<Import>());
+ model->setFileUrl(d->model->fileUrl());
+ model->changeImports(d->model->imports(), QList<Import>());
Q_ASSERT(model);
DesignDocumentControllerView view;
- m_d->model->attachView(&view);
+ d->model->attachView(&view);
if (view.selectedModelNodes().isEmpty())
return;
@@ -616,7 +616,7 @@ void DesignDocumentController::copySelected()
if (!selectedNode.isValid())
return;
- m_d->model->detachView(&view);
+ d->model->detachView(&view);
model->attachView(&view);
view.replaceModel(selectedNode);
@@ -626,7 +626,7 @@ void DesignDocumentController::copySelected()
view.toClipboard();
} else { //multi items selected
- m_d->model->detachView(&view);
+ d->model->detachView(&view);
model->attachView(&view);
foreach (ModelNode node, view.rootModelNode().allDirectSubModelNodes()) {
@@ -684,12 +684,12 @@ static void scatterItem(ModelNode pastedNode, const ModelNode targetNode, int of
void DesignDocumentController::paste()
{
QScopedPointer<Model> model(Model::create("empty", 1, 0, this->model()));
- model->setFileUrl(m_d->model->fileUrl());
- model->changeImports(m_d->model->imports(), QList<Import>());
+ model->setFileUrl(d->model->fileUrl());
+ model->changeImports(d->model->imports(), QList<Import>());
Q_ASSERT(model);
- if (!m_d->model)
+ if (!d->model)
return;
DesignDocumentControllerView view;
@@ -707,7 +707,7 @@ void DesignDocumentController::paste()
qDebug() << rootNode;
qDebug() << selectedNodes;
model->detachView(&view);
- m_d->model->attachView(&view);
+ d->model->attachView(&view);
ModelNode targetNode;
@@ -732,7 +732,7 @@ void DesignDocumentController::paste()
QList<ModelNode> pastedNodeList;
try {
- RewriterTransaction transaction(m_d->formEditorView.data());
+ RewriterTransaction transaction(d->formEditorView.data());
int offset = double(qrand()) / RAND_MAX * 20 - 10;
@@ -750,10 +750,10 @@ void DesignDocumentController::paste()
}
} else {
try {
- RewriterTransaction transaction(m_d->formEditorView.data());
+ RewriterTransaction transaction(d->formEditorView.data());
model->detachView(&view);
- m_d->model->attachView(&view);
+ d->model->attachView(&view);
ModelNode pastedNode(view.insertModel(rootNode));
ModelNode targetNode;
@@ -789,11 +789,11 @@ void DesignDocumentController::paste()
void DesignDocumentController::selectAll()
{
- if (!m_d->model)
+ if (!d->model)
return;
DesignDocumentControllerView view;
- m_d->model->attachView(&view);
+ d->model->attachView(&view);
QList<ModelNode> allNodesExceptRootNode(view.allModelNodes());
@@ -803,21 +803,21 @@ void DesignDocumentController::selectAll()
RewriterView *DesignDocumentController::rewriterView() const
{
- return m_d->rewriterView.data();
+ return d->rewriterView.data();
}
void DesignDocumentController::undo()
{
- if (m_d->rewriterView && !m_d->rewriterView->modificationGroupActive())
- m_d->textEdit->undo();
- m_d->propertyEditorView->resetView();
+ if (d->rewriterView && !d->rewriterView->modificationGroupActive())
+ d->textEdit->undo();
+ d->propertyEditorView->resetView();
}
void DesignDocumentController::redo()
{
- if (m_d->rewriterView && !m_d->rewriterView->modificationGroupActive())
- m_d->textEdit->redo();
- m_d->propertyEditorView->resetView();
+ if (d->rewriterView && !d->rewriterView->modificationGroupActive())
+ d->textEdit->redo();
+ d->propertyEditorView->resetView();
}
static inline QtSupport::BaseQtVersion *getActiveQtVersion(DesignDocumentController *controller)
@@ -862,48 +862,48 @@ void DesignDocumentController::activeQtVersionChanged()
QtSupport::BaseQtVersion *newQtVersion = getActiveQtVersion(this);
if (!newQtVersion ) {
- m_d->qt_versionId = -1;
+ d->qt_versionId = -1;
return;
}
- if (m_d->qt_versionId == newQtVersion->uniqueId())
+ if (d->qt_versionId == newQtVersion->uniqueId())
return;
- m_d->qt_versionId = newQtVersion->uniqueId();
+ d->qt_versionId = newQtVersion->uniqueId();
- if (m_d->nodeInstanceView)
- m_d->nodeInstanceView->setPathToQt(pathToQt());
+ if (d->nodeInstanceView)
+ d->nodeInstanceView->setPathToQt(pathToQt());
}
#ifdef ENABLE_TEXT_VIEW
void DesignDocumentController::showText()
{
- m_d->stackedWidget->setCurrentWidget(m_d->textEdit.data());
+ d->stackedWidget->setCurrentWidget(d->textEdit.data());
}
#endif // ENABLE_TEXT_VIEW
#ifdef ENABLE_TEXT_VIEW
void DesignDocumentController::showForm()
{
- m_d->stackedWidget->setCurrentWidget(m_d->formEditorView->widget());
+ d->stackedWidget->setCurrentWidget(d->formEditorView->widget());
}
#endif // ENABLE_TEXT_VIEW
bool DesignDocumentController::save(QWidget *parent)
{
- // qDebug() << "Saving document to file \"" << m_d->fileName << "\"...";
+ // qDebug() << "Saving document to file \"" << d->fileName << "\"...";
//
- if (m_d->fileName.isEmpty()) {
+ if (d->fileName.isEmpty()) {
saveAs(parent);
return true;
}
- Utils::FileSaver saver(m_d->fileName, QIODevice::Text);
- if (m_d->model)
- saver.write(m_d->textEdit->toPlainText().toLatin1());
- if (!saver.finalize(parent ? parent : m_d->stackedWidget.data()))
+ Utils::FileSaver saver(d->fileName, QIODevice::Text);
+ if (d->model)
+ saver.write(d->textEdit->toPlainText().toLatin1());
+ if (!saver.finalize(parent ? parent : d->stackedWidget.data()))
return false;
- if (m_d->model)
- m_d->textEdit->setPlainText(m_d->textEdit->toPlainText()); // clear undo/redo history
+ if (d->model)
+ d->textEdit->setPlainText(d->textEdit->toPlainText()); // clear undo/redo history
return true;
}
@@ -912,7 +912,7 @@ bool DesignDocumentController::save(QWidget *parent)
QString DesignDocumentController::contextHelpId() const
{
DesignDocumentControllerView view;
- m_d->model->attachView(&view);
+ d->model->attachView(&view);
QList<ModelNode> nodes = view.selectedModelNodes();
QString helpId;
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.h b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.h
index ea6dcb89ca..be0c3a0227 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.h
+++ b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.h
@@ -144,7 +144,7 @@ private:
QWidget *centralWidget() const;
QString pathToQt() const;
- class DesignDocumentControllerPrivate *m_d;
+ class DesignDocumentControllerPrivate *d;
static DesignDocumentController* m_this;
};
diff --git a/src/plugins/qmldesigner/components/integration/integrationcore.cpp b/src/plugins/qmldesigner/components/integration/integrationcore.cpp
index 2361d4d87a..58f581007e 100644
--- a/src/plugins/qmldesigner/components/integration/integrationcore.cpp
+++ b/src/plugins/qmldesigner/components/integration/integrationcore.cpp
@@ -71,7 +71,7 @@ IntegrationCore *CorePrivate::m_instance = 0;
*/
IntegrationCore::IntegrationCore() :
- m_d(new CorePrivate)
+ d(new CorePrivate)
{
Q_ASSERT(CorePrivate::m_instance == 0);
CorePrivate::m_instance = this;
@@ -80,7 +80,7 @@ IntegrationCore::IntegrationCore() :
IntegrationCore::~IntegrationCore()
{
CorePrivate::m_instance = 0;
- delete m_d;
+ delete d;
}
IntegrationCore *IntegrationCore::instance()
@@ -91,7 +91,7 @@ IntegrationCore *IntegrationCore::instance()
PluginManager *IntegrationCore::pluginManager() const
{
- return &m_d->m_pluginManager;
+ return &d->m_pluginManager;
}
}
diff --git a/src/plugins/qmldesigner/components/integration/integrationcore.h b/src/plugins/qmldesigner/components/integration/integrationcore.h
index 24c8e9b16c..6a5a672788 100644
--- a/src/plugins/qmldesigner/components/integration/integrationcore.h
+++ b/src/plugins/qmldesigner/components/integration/integrationcore.h
@@ -59,7 +59,7 @@ public:
static IntegrationCore *instance();
private:
- CorePrivate *m_d;
+ CorePrivate *d;
};
} // namspace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
index 2b22acb795..54d91fa636 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
@@ -137,49 +137,49 @@ ItemLibraryWidgetPrivate::ItemLibraryWidgetPrivate(QObject *object) :
ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
QFrame(parent),
- m_d(new ItemLibraryWidgetPrivate(this)),
+ d(new ItemLibraryWidgetPrivate(this)),
m_filterFlag(QtBasic)
{
setWindowTitle(tr("Library", "Title of library view"));
/* create Items view and its model */
- m_d->m_itemsView = new QDeclarativeView(this);
- m_d->m_itemsView->setAttribute(Qt::WA_OpaquePaintEvent);
- m_d->m_itemsView->setAttribute(Qt::WA_NoSystemBackground);
- m_d->m_itemsView->setAcceptDrops(false);
- m_d->m_itemsView->setFocusPolicy(Qt::ClickFocus);
- m_d->m_itemsView->setResizeMode(QDeclarativeView::SizeRootObjectToView);
- m_d->m_itemLibraryModel = new Internal::ItemLibraryModel(QDeclarativeEnginePrivate::getScriptEngine(m_d->m_itemsView->engine()), this);
- m_d->m_itemLibraryModel->setItemIconSize(m_d->m_itemIconSize);
-
- QDeclarativeContext *rootContext = m_d->m_itemsView->rootContext();
- rootContext->setContextProperty(QLatin1String("itemLibraryModel"), m_d->m_itemLibraryModel);
- rootContext->setContextProperty(QLatin1String("itemLibraryIconWidth"), m_d->m_itemIconSize.width());
- rootContext->setContextProperty(QLatin1String("itemLibraryIconHeight"), m_d->m_itemIconSize.height());
+ d->m_itemsView = new QDeclarativeView(this);
+ d->m_itemsView->setAttribute(Qt::WA_OpaquePaintEvent);
+ d->m_itemsView->setAttribute(Qt::WA_NoSystemBackground);
+ d->m_itemsView->setAcceptDrops(false);
+ d->m_itemsView->setFocusPolicy(Qt::ClickFocus);
+ d->m_itemsView->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ d->m_itemLibraryModel = new Internal::ItemLibraryModel(QDeclarativeEnginePrivate::getScriptEngine(d->m_itemsView->engine()), this);
+ d->m_itemLibraryModel->setItemIconSize(d->m_itemIconSize);
+
+ QDeclarativeContext *rootContext = d->m_itemsView->rootContext();
+ rootContext->setContextProperty(QLatin1String("itemLibraryModel"), d->m_itemLibraryModel);
+ rootContext->setContextProperty(QLatin1String("itemLibraryIconWidth"), d->m_itemIconSize.width());
+ rootContext->setContextProperty(QLatin1String("itemLibraryIconHeight"), d->m_itemIconSize.height());
QColor highlightColor = palette().highlight().color();
if (0.5*highlightColor.saturationF()+0.75-highlightColor.valueF() < 0)
highlightColor.setHsvF(highlightColor.hsvHueF(),0.1 + highlightColor.saturationF()*2.0, highlightColor.valueF());
- m_d->m_itemsView->rootContext()->setContextProperty(QLatin1String("highlightColor"), highlightColor);
+ d->m_itemsView->rootContext()->setContextProperty(QLatin1String("highlightColor"), highlightColor);
// loading the qml has to come after all needed context properties are set
- m_d->m_itemsView->setSource(QUrl("qrc:/ItemLibrary/qml/ItemsView.qml"));
+ d->m_itemsView->setSource(QUrl("qrc:/ItemLibrary/qml/ItemsView.qml"));
- QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(m_d->m_itemsView->rootObject());
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(d->m_itemsView->rootObject());
connect(rootItem, SIGNAL(itemSelected(int)), this, SLOT(showItemInfo(int)));
connect(rootItem, SIGNAL(itemDragged(int)), this, SLOT(startDragAndDrop(int)));
connect(this, SIGNAL(scrollItemsView(QVariant)), rootItem, SLOT(scrollView(QVariant)));
connect(this, SIGNAL(resetItemsView()), rootItem, SLOT(resetView()));
/* create Resources view and its model */
- m_d->m_resourcesFileSystemModel = new QFileSystemModel(this);
- m_d->m_resourcesFileSystemModel->setIconProvider(&m_d->m_iconProvider);
- m_d->m_resourcesView = new Internal::ItemLibraryTreeView(this);
- m_d->m_resourcesView->setModel(m_d->m_resourcesFileSystemModel);
- m_d->m_resourcesView->setIconSize(m_d->m_resIconSize);
+ d->m_resourcesFileSystemModel = new QFileSystemModel(this);
+ d->m_resourcesFileSystemModel->setIconProvider(&d->m_iconProvider);
+ d->m_resourcesView = new Internal::ItemLibraryTreeView(this);
+ d->m_resourcesView->setModel(d->m_resourcesFileSystemModel);
+ d->m_resourcesView->setIconSize(d->m_resIconSize);
/* create image provider for loading item icons */
- m_d->m_itemsView->engine()->addImageProvider(QLatin1String("qmldesigner_itemlibrary"), new Internal::ItemLibraryImageProvider);
+ d->m_itemsView->engine()->addImageProvider(QLatin1String("qmldesigner_itemlibrary"), new Internal::ItemLibraryImageProvider);
/* other widgets */
QTabBar *tabBar = new QTabBar(this);
@@ -187,12 +187,12 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
tabBar->addTab(tr("Resources", "Title of library resources view"));
tabBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- m_d->m_lineEdit = new Utils::FilterLineEdit(this);
- m_d->m_lineEdit->setObjectName(QLatin1String("itemLibrarySearchInput"));
- m_d->m_lineEdit->setPlaceholderText(tr("<Filter>", "Library search input hint text"));
- m_d->m_lineEdit->setDragEnabled(false);
- m_d->m_lineEdit->setMinimumWidth(75);
- m_d->m_lineEdit->setTextMargins(0, 0, 20, 0);
+ d->m_lineEdit = new Utils::FilterLineEdit(this);
+ d->m_lineEdit->setObjectName(QLatin1String("itemLibrarySearchInput"));
+ d->m_lineEdit->setPlaceholderText(tr("<Filter>", "Library search input hint text"));
+ d->m_lineEdit->setDragEnabled(false);
+ d->m_lineEdit->setMinimumWidth(75);
+ d->m_lineEdit->setTextMargins(0, 0, 20, 0);
QWidget *lineEditFrame = new QWidget(this);
lineEditFrame->setObjectName(QLatin1String("itemLibrarySearchInputFrame"));
QGridLayout *lineEditLayout = new QGridLayout(lineEditFrame);
@@ -200,15 +200,15 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
lineEditLayout->setSpacing(0);
lineEditLayout->addItem(new QSpacerItem(5, 3, QSizePolicy::Fixed, QSizePolicy::Fixed), 0, 0, 1, 3);
lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 0);
- lineEditLayout->addWidget(m_d->m_lineEdit, 1, 1, 1, 1);
+ lineEditLayout->addWidget(d->m_lineEdit, 1, 1, 1, 1);
lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 2);
- connect(m_d->m_lineEdit, SIGNAL(filterChanged(QString)), this, SLOT(setSearchFilter(QString)));
+ connect(d->m_lineEdit, SIGNAL(filterChanged(QString)), this, SLOT(setSearchFilter(QString)));
- m_d->m_stackedWidget = new QStackedWidget(this);
- m_d->m_stackedWidget->addWidget(m_d->m_itemsView);
- m_d->m_stackedWidget->addWidget(m_d->m_resourcesView);
+ d->m_stackedWidget = new QStackedWidget(this);
+ d->m_stackedWidget->addWidget(d->m_itemsView);
+ d->m_stackedWidget->addWidget(d->m_resourcesView);
connect(tabBar, SIGNAL(currentChanged(int)),
- m_d->m_stackedWidget, SLOT(setCurrentIndex(int)));
+ d->m_stackedWidget, SLOT(setCurrentIndex(int)));
connect(tabBar, SIGNAL(currentChanged(int)),
this, SLOT(updateSearch()));
@@ -222,14 +222,14 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
layout->addWidget(tabBar, 0, 0, 1, 1);
layout->addWidget(spacer, 1, 0);
layout->addWidget(lineEditFrame, 2, 0, 1, 1);
- layout->addWidget(m_d->m_stackedWidget, 3, 0, 1, 1);
+ layout->addWidget(d->m_stackedWidget, 3, 0, 1, 1);
setResourcePath(QDir::currentPath());
setSearchFilter(QString());
/* style sheets */
setStyleSheet(QLatin1String(Utils::FileReader::fetchQrc(":/qmldesigner/stylesheet.css")));
- m_d->m_resourcesView->setStyleSheet(
+ d->m_resourcesView->setStyleSheet(
QLatin1String(Utils::FileReader::fetchQrc(":/qmldesigner/scrollbar.css")));
}
@@ -237,22 +237,22 @@ ItemLibraryWidget::~ItemLibraryWidget()
{
/* workaround: delete the items view before the model is deleted.
This prevents qml warnings when the item library is destructed. */
- delete m_d->m_itemsView;
- delete m_d->m_resourcesView;
- delete m_d;
+ delete d->m_itemsView;
+ delete d->m_resourcesView;
+ delete d;
}
void ItemLibraryWidget::setItemLibraryInfo(ItemLibraryInfo *itemLibraryInfo)
{
- if (m_d->m_itemLibraryInfo.data() == itemLibraryInfo)
+ if (d->m_itemLibraryInfo.data() == itemLibraryInfo)
return;
- if (m_d->m_itemLibraryInfo)
- disconnect(m_d->m_itemLibraryInfo.data(), SIGNAL(entriesChanged()),
+ if (d->m_itemLibraryInfo)
+ disconnect(d->m_itemLibraryInfo.data(), SIGNAL(entriesChanged()),
this, SLOT(updateModel()));
- m_d->m_itemLibraryInfo = itemLibraryInfo;
+ d->m_itemLibraryInfo = itemLibraryInfo;
if (itemLibraryInfo)
- connect(m_d->m_itemLibraryInfo.data(), SIGNAL(entriesChanged()),
+ connect(d->m_itemLibraryInfo.data(), SIGNAL(entriesChanged()),
this, SLOT(updateModel()));
updateModel();
@@ -263,9 +263,9 @@ void ItemLibraryWidget::updateImports()
{
FilterChangeFlag filter;
filter = QtBasic;
- if (m_d->model) {
+ if (d->model) {
QStringList imports;
- foreach (const Import &import, m_d->model->imports())
+ foreach (const Import &import, d->model->imports())
if (import.isLibraryImport())
imports << import.url();
if (imports.contains("com.nokia.symbian", Qt::CaseInsensitive))
@@ -319,10 +319,10 @@ QList<QToolButton *> ItemLibraryWidget::createToolBarWidgets()
void ItemLibraryWidget::setSearchFilter(const QString &searchFilter)
{
- if (m_d->m_stackedWidget->currentIndex() == 0) {
- m_d->m_itemLibraryModel->setSearchText(searchFilter);
+ if (d->m_stackedWidget->currentIndex() == 0) {
+ d->m_itemLibraryModel->setSearchText(searchFilter);
emit resetItemsView();
- m_d->m_itemsView->update();
+ d->m_itemsView->update();
} else {
QStringList nameFilterList;
if (searchFilter.contains('.')) {
@@ -333,17 +333,17 @@ void ItemLibraryWidget::setSearchFilter(const QString &searchFilter)
}
}
- m_d->m_resourcesFileSystemModel->setFilter(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
- m_d->m_resourcesFileSystemModel->setNameFilterDisables(false);
- m_d->m_resourcesFileSystemModel->setNameFilters(nameFilterList);
- m_d->m_resourcesView->expandToDepth(1);
- m_d->m_resourcesView->scrollToTop();
+ d->m_resourcesFileSystemModel->setFilter(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
+ d->m_resourcesFileSystemModel->setNameFilterDisables(false);
+ d->m_resourcesFileSystemModel->setNameFilters(nameFilterList);
+ d->m_resourcesView->expandToDepth(1);
+ d->m_resourcesView->scrollToTop();
}
}
void ItemLibraryWidget::setModel(Model *model)
{
- m_d->model = model;
+ d->model = model;
if (!model)
return;
setItemLibraryInfo(model->metaInfo().itemLibraryInfo());
@@ -352,14 +352,14 @@ void ItemLibraryWidget::setModel(Model *model)
void ItemLibraryWidget::emitImportChecked()
{
- if (!m_d->model)
+ if (!d->model)
return;
bool qtOnlyImport = false;
bool meegoImport = false;
bool symbianImport = false;
- foreach (const Import &import, m_d->model->imports()) {
+ foreach (const Import &import, d->model->imports()) {
if (import.isLibraryImport()) {
if (import.url().contains(QString("meego"), Qt::CaseInsensitive))
meegoImport = true;
@@ -383,7 +383,7 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
return;
static bool block = false;
- if (!m_d->model)
+ if (!d->model)
return;
if (flag == m_filterFlag)
return;
@@ -443,36 +443,36 @@ void ItemLibraryWidget::onSymbianChecked(bool b)
void ItemLibraryWidget::updateModel()
{
- m_d->m_itemLibraryModel->update(m_d->m_itemLibraryInfo.data(), m_d->model);
+ d->m_itemLibraryModel->update(d->m_itemLibraryInfo.data(), d->model);
updateImports();
updateSearch();
}
void ItemLibraryWidget::updateSearch()
{
- setSearchFilter(m_d->m_lineEdit->text());
+ setSearchFilter(d->m_lineEdit->text());
}
void ItemLibraryWidget::setResourcePath(const QString &resourcePath)
{
- if (m_d->m_resourcesView->model() == m_d->m_resourcesFileSystemModel) {
- m_d->m_resourcesFileSystemModel->setRootPath(resourcePath);
- m_d->m_resourcesView->setRootIndex(m_d->m_resourcesFileSystemModel->index(resourcePath));
+ if (d->m_resourcesView->model() == d->m_resourcesFileSystemModel) {
+ d->m_resourcesFileSystemModel->setRootPath(resourcePath);
+ d->m_resourcesView->setRootIndex(d->m_resourcesFileSystemModel->index(resourcePath));
}
updateSearch();
}
void ItemLibraryWidget::startDragAndDrop(int itemLibId)
{
- QMimeData *mimeData = m_d->m_itemLibraryModel->getMimeData(itemLibId);
+ QMimeData *mimeData = d->m_itemLibraryModel->getMimeData(itemLibId);
CustomItemLibraryDrag *drag = new CustomItemLibraryDrag(this);
const QImage image = qvariant_cast<QImage>(mimeData->imageData());
- drag->setPixmap(m_d->m_itemLibraryModel->getIcon(itemLibId).pixmap(32, 32));
+ drag->setPixmap(d->m_itemLibraryModel->getIcon(itemLibId).pixmap(32, 32));
drag->setPreview(QPixmap::fromImage(image));
drag->setMimeData(mimeData);
- QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(m_d->m_itemsView->rootObject());
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(d->m_itemsView->rootObject());
connect(rootItem, SIGNAL(stopDragAndDrop()), drag, SLOT(stopDrag()));
drag->exec();
@@ -485,8 +485,8 @@ void ItemLibraryWidget::showItemInfo(int /*itemLibId*/)
void ItemLibraryWidget::wheelEvent(QWheelEvent *event)
{
- if (m_d->m_stackedWidget->currentIndex() == 0 &&
- m_d->m_itemsView->rect().contains(event->pos())) {
+ if (d->m_stackedWidget->currentIndex() == 0 &&
+ d->m_itemsView->rect().contains(event->pos())) {
emit scrollItemsView(event->delta());
event->accept();
} else
@@ -495,22 +495,22 @@ void ItemLibraryWidget::wheelEvent(QWheelEvent *event)
void ItemLibraryWidget::removeImport(const QString &name)
{
- if (!m_d->model)
+ if (!d->model)
return;
QList<Import> toBeRemovedImportList;
- foreach (const Import &import, m_d->model->imports())
+ foreach (const Import &import, d->model->imports())
if (import.isLibraryImport() && import.url().compare(name, Qt::CaseInsensitive) == 0)
toBeRemovedImportList.append(import);
- m_d->model->changeImports(QList<Import>(), toBeRemovedImportList);
+ d->model->changeImports(QList<Import>(), toBeRemovedImportList);
}
void ItemLibraryWidget::addImport(const QString &name, const QString &version)
{
- if (!m_d->model)
+ if (!d->model)
return;
- m_d->model->changeImports(QList<Import>() << Import::createLibraryImport(name, version), QList<Import>());
+ d->model->changeImports(QList<Import>() << Import::createLibraryImport(name, version), QList<Import>());
}
}
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
index 5aedccb7b5..612d6e13ad 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
@@ -96,7 +96,7 @@ signals:
void symbianChecked(bool b);
private:
- ItemLibraryWidgetPrivate *m_d;
+ ItemLibraryWidgetPrivate *d;
FilterChangeFlag m_filterFlag;
};
diff --git a/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.cpp b/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.cpp
index 60c05a8180..ab9fe5cc6e 100644
--- a/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.cpp
+++ b/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.cpp
@@ -113,13 +113,13 @@ public:
};
PluginManager::PluginManager() :
- m_d(new PluginManagerPrivate)
+ d(new PluginManagerPrivate)
{
}
PluginManager::~PluginManager()
{
- delete m_d;
+ delete d;
}
PluginManager::IPluginList PluginManager::instances()
@@ -127,8 +127,8 @@ PluginManager::IPluginList PluginManager::instances()
if (debug)
qDebug() << '>' << Q_FUNC_INFO << QLibraryInfo::buildKey();
IPluginList rc;
- const PluginManagerPrivate::PluginPathList::iterator end = m_d->m_paths.end();
- for (PluginManagerPrivate::PluginPathList::iterator it = m_d->m_paths.begin(); it != end; ++it)
+ const PluginManagerPrivate::PluginPathList::iterator end = d->m_paths.end();
+ for (PluginManagerPrivate::PluginPathList::iterator it = d->m_paths.begin(); it != end; ++it)
it->getInstances(&rc);
if (debug)
qDebug() << '<' << Q_FUNC_INFO << rc.size();
@@ -141,7 +141,7 @@ void PluginManager::setPluginPaths(const QStringList &paths)
const QDir dir(path);
if (!dir.exists())
continue;
- m_d->m_paths.push_back(PluginPath(dir));
+ d->m_paths.push_back(PluginPath(dir));
}
// also register path in widgetpluginmanager
@@ -151,8 +151,8 @@ void PluginManager::setPluginPaths(const QStringList &paths)
QAbstractItemModel *PluginManager::createModel(QObject *parent)
{
QStandardItemModel *model = new QStandardItemModel(parent);
- const PluginManagerPrivate::PluginPathList::iterator end = m_d->m_paths.end();
- for (PluginManagerPrivate::PluginPathList::iterator it = m_d->m_paths.begin(); it != end; ++it)
+ const PluginManagerPrivate::PluginPathList::iterator end = d->m_paths.end();
+ for (PluginManagerPrivate::PluginPathList::iterator it = d->m_paths.begin(); it != end; ++it)
model->appendRow(it->createModelItem());
return model;
}
diff --git a/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h b/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h
index 6a3575e012..d616f0c2b9 100644
--- a/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h
+++ b/src/plugins/qmldesigner/components/pluginmanager/pluginmanager.h
@@ -73,7 +73,7 @@ private:
// dialog. Forces plugin initialization.
QAbstractItemModel *createModel(QObject *parent = 0);
- PluginManagerPrivate *m_d;
+ PluginManagerPrivate *d;
};
} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h b/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h
index 521c2e6b87..82b5a13987 100644
--- a/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h
+++ b/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h
@@ -118,7 +118,7 @@ signals:
private:
ItemLibraryInfo(QObject *parent = 0);
void setBaseInfo(ItemLibraryInfo *baseInfo);
- QScopedPointer<Internal::ItemLibraryInfoPrivate> m_d;
+ QScopedPointer<Internal::ItemLibraryInfoPrivate> d;
};
} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/include/model.h b/src/plugins/qmldesigner/designercore/include/model.h
index fa44721531..360cff914d 100644
--- a/src/plugins/qmldesigner/designercore/include/model.h
+++ b/src/plugins/qmldesigner/designercore/include/model.h
@@ -114,7 +114,7 @@ protected:
Model();
public:
- Internal::ModelPrivate *m_d;
+ Internal::ModelPrivate *d;
};
}
diff --git a/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h b/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h
index 14a81fc3c2..34b843c6b6 100644
--- a/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h
+++ b/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h
@@ -63,7 +63,7 @@ public:
private:
friend class Internal::SubComponentManagerPrivate;
- Internal::SubComponentManagerPrivate *m_d;
+ Internal::SubComponentManagerPrivate *d;
};
} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
index 7f7c66a33e..6c063bf861 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
@@ -257,7 +257,7 @@ QDataStream& operator>>(QDataStream& stream, ItemLibraryEntry &itemLibraryEntry)
ItemLibraryInfo::ItemLibraryInfo(QObject *parent) :
QObject(parent),
- m_d(new Internal::ItemLibraryInfoPrivate())
+ d(new Internal::ItemLibraryInfoPrivate())
{
}
@@ -269,35 +269,35 @@ QList<ItemLibraryEntry> ItemLibraryInfo::entriesForType(const QString &typeName,
{
QList<ItemLibraryEntry> entries;
- foreach (const ItemLibraryEntry &entry, m_d->nameToEntryHash) {
+ foreach (const ItemLibraryEntry &entry, d->nameToEntryHash) {
if (entry.typeName() == typeName
&& entry.majorVersion() >= majorVersion
&& entry.minorVersion() >= minorVersion)
entries += entry;
}
- if (m_d->baseInfo)
- entries += m_d->baseInfo->entriesForType(typeName, majorVersion, minorVersion);
+ if (d->baseInfo)
+ entries += d->baseInfo->entriesForType(typeName, majorVersion, minorVersion);
return entries;
}
ItemLibraryEntry ItemLibraryInfo::entry(const QString &name) const
{
- if (m_d->nameToEntryHash.contains(name))
- return m_d->nameToEntryHash.value(name);
+ if (d->nameToEntryHash.contains(name))
+ return d->nameToEntryHash.value(name);
- if (m_d->baseInfo)
- return m_d->baseInfo->entry(name);
+ if (d->baseInfo)
+ return d->baseInfo->entry(name);
return ItemLibraryEntry();
}
QList<ItemLibraryEntry> ItemLibraryInfo::entries() const
{
- QList<ItemLibraryEntry> list = m_d->nameToEntryHash.values();
- if (m_d->baseInfo)
- list += m_d->baseInfo->entries();
+ QList<ItemLibraryEntry> list = d->nameToEntryHash.values();
+ if (d->baseInfo)
+ list += d->baseInfo->entries();
return list;
}
@@ -309,9 +309,9 @@ static inline QString keyForEntry(const ItemLibraryEntry &entry)
void ItemLibraryInfo::addEntry(const ItemLibraryEntry &entry)
{
const QString key = keyForEntry(entry);
- if (m_d->nameToEntryHash.contains(key))
+ if (d->nameToEntryHash.contains(key))
throw InvalidMetaInfoException(__LINE__, __FUNCTION__, __FILE__);
- m_d->nameToEntryHash.insert(key, entry);
+ d->nameToEntryHash.insert(key, entry);
emit entriesChanged();
}
@@ -319,18 +319,18 @@ void ItemLibraryInfo::addEntry(const ItemLibraryEntry &entry)
bool ItemLibraryInfo::containsEntry(const ItemLibraryEntry &entry)
{
const QString key = keyForEntry(entry);
- return m_d->nameToEntryHash.contains(key);
+ return d->nameToEntryHash.contains(key);
}
void ItemLibraryInfo::clearEntries()
{
- m_d->nameToEntryHash.clear();
+ d->nameToEntryHash.clear();
emit entriesChanged();
}
void ItemLibraryInfo::setBaseInfo(ItemLibraryInfo *baseInfo)
{
- m_d->baseInfo = baseInfo;
+ d->baseInfo = baseInfo;
}
} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
index 64dc52fe6d..c231167789 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
@@ -372,23 +372,23 @@ Model *SubComponentManagerPrivate::model() const
SubComponentManager::SubComponentManager(Model *model, QObject *parent) :
QObject(parent),
- m_d(new Internal::SubComponentManagerPrivate(model, this))
+ d(new Internal::SubComponentManagerPrivate(model, this))
{
}
SubComponentManager::~SubComponentManager()
{
- delete m_d;
+ delete d;
}
QStringList SubComponentManager::directories() const
{
- return m_d->m_watcher.directories();
+ return d->m_watcher.directories();
}
QStringList SubComponentManager::qmlFiles() const
{
- return m_d->m_watcher.files();
+ return d->m_watcher.files();
}
void SubComponentManager::update(const QUrl &filePath, const QList<Import> &imports)
@@ -398,8 +398,8 @@ void SubComponentManager::update(const QUrl &filePath, const QList<Import> &impo
QFileInfo oldDir, newDir;
- if (!m_d->m_filePath.isEmpty()) {
- const QString file = m_d->m_filePath.toLocalFile();
+ if (!d->m_filePath.isEmpty()) {
+ const QString file = d->m_filePath.toLocalFile();
oldDir = QFileInfo(QFileInfo(file).path());
}
if (!filePath.isEmpty()) {
@@ -407,20 +407,20 @@ void SubComponentManager::update(const QUrl &filePath, const QList<Import> &impo
newDir = QFileInfo(QFileInfo(file).path());
}
- m_d->m_filePath = filePath;
+ d->m_filePath = filePath;
//
// (implicit) import of local directory
//
if (oldDir != newDir) {
if (!oldDir.filePath().isEmpty()) {
- m_d->m_dirToQualifier.remove(oldDir.canonicalFilePath(), QString());
- if (!m_d->m_dirToQualifier.contains(oldDir.canonicalFilePath()))
- m_d->m_watcher.removePath(oldDir.filePath());
+ d->m_dirToQualifier.remove(oldDir.canonicalFilePath(), QString());
+ if (!d->m_dirToQualifier.contains(oldDir.canonicalFilePath()))
+ d->m_watcher.removePath(oldDir.filePath());
}
if (!newDir.filePath().isEmpty()) {
- m_d->m_dirToQualifier.insertMulti(newDir.canonicalFilePath(), QString());
+ d->m_dirToQualifier.insertMulti(newDir.canonicalFilePath(), QString());
}
}
@@ -430,20 +430,20 @@ void SubComponentManager::update(const QUrl &filePath, const QList<Import> &impo
// skip first list items until the lists differ
int i = 0;
- while (i < qMin(imports.size(), m_d->m_imports.size())) {
- if (!(imports.at(i) == m_d->m_imports.at(i)))
+ while (i < qMin(imports.size(), d->m_imports.size())) {
+ if (!(imports.at(i) == d->m_imports.at(i)))
break;
++i;
}
- for (int ii = m_d->m_imports.size() - 1; ii >= i; --ii)
- m_d->removeImport(ii);
+ for (int ii = d->m_imports.size() - 1; ii >= i; --ii)
+ d->removeImport(ii);
for (int ii = i; ii < imports.size(); ++ii) {
- m_d->addImport(ii, imports.at(ii));
+ d->addImport(ii, imports.at(ii));
}
- m_d->parseDirectories();
+ d->parseDirectories();
}
} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/model/abstractview.cpp b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
index 3b287d32b4..35de5b12a4 100644
--- a/src/plugins/qmldesigner/designercore/model/abstractview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
@@ -85,7 +85,7 @@ ModelNode AbstractView::createModelNode(const QString &typeString,
const QString &nodeSource,
ModelNode::NodeSourceType nodeSourceType)
{
- return ModelNode(model()->m_d->createNode(typeString, majorVersion, minorVersion, propertyList, auxPropertyList, nodeSource, nodeSourceType), model(), this);
+ return ModelNode(model()->d->createNode(typeString, majorVersion, minorVersion, propertyList, auxPropertyList, nodeSource, nodeSourceType), model(), this);
}
@@ -97,7 +97,7 @@ ModelNode AbstractView::createModelNode(const QString &typeString,
const ModelNode AbstractView::rootModelNode() const
{
Q_ASSERT(model());
- return ModelNode(model()->m_d->rootNode(), model(), const_cast<AbstractView*>(this));
+ return ModelNode(model()->d->rootNode(), model(), const_cast<AbstractView*>(this));
}
@@ -109,7 +109,7 @@ const ModelNode AbstractView::rootModelNode() const
ModelNode AbstractView::rootModelNode()
{
Q_ASSERT(model());
- return ModelNode(model()->m_d->rootNode(), model(), this);
+ return ModelNode(model()->d->rootNode(), model(), this);
}
/*!
@@ -276,7 +276,7 @@ QList<Internal::InternalNode::Pointer> toInternalNodeList(const QList<ModelNode>
*/
void AbstractView::setSelectedModelNodes(const QList<ModelNode> &selectedNodeList)
{
- model()->m_d->setSelectedNodes(toInternalNodeList(selectedNodeList));
+ model()->d->setSelectedNodes(toInternalNodeList(selectedNodeList));
}
/*!
@@ -284,7 +284,7 @@ void AbstractView::setSelectedModelNodes(const QList<ModelNode> &selectedNodeLis
*/
void AbstractView::clearSelectedModelNodes()
{
- model()->m_d->clearSelectedNodes();
+ model()->d->clearSelectedNodes();
}
/*!
@@ -293,7 +293,7 @@ void AbstractView::clearSelectedModelNodes()
*/
QList<ModelNode> AbstractView::selectedModelNodes() const
{
- return toModelNodeList(model()->m_d->selectedNodes());
+ return toModelNodeList(model()->d->selectedNodes());
}
/*!
@@ -302,7 +302,7 @@ QList<ModelNode> AbstractView::selectedModelNodes() const
*/
void AbstractView::selectModelNode(const ModelNode &node)
{
- model()->m_d->selectNode(node.internalNode());
+ model()->d->selectNode(node.internalNode());
}
/*!
@@ -311,27 +311,27 @@ void AbstractView::selectModelNode(const ModelNode &node)
*/
void AbstractView::deselectModelNode(const ModelNode &node)
{
- model()->m_d->deselectNode(node.internalNode());
+ model()->d->deselectNode(node.internalNode());
}
ModelNode AbstractView::modelNodeForId(const QString &id)
{
- return ModelNode(model()->m_d->nodeForId(id), model(), this);
+ return ModelNode(model()->d->nodeForId(id), model(), this);
}
bool AbstractView::hasId(const QString &id) const
{
- return model()->m_d->hasId(id);
+ return model()->d->hasId(id);
}
ModelNode AbstractView::modelNodeForInternalId(qint32 internalId)
{
- return ModelNode(model()->m_d->nodeForInternalId(internalId), model(), this);
+ return ModelNode(model()->d->nodeForInternalId(internalId), model(), this);
}
bool AbstractView::hasModelNodeForInternalId(qint32 internalId) const
{
- return model()->m_d->hasNodeForInternalId(internalId);
+ return model()->d->hasNodeForInternalId(internalId);
}
QmlModelView *AbstractView::toQmlModelView()
@@ -342,7 +342,7 @@ QmlModelView *AbstractView::toQmlModelView()
NodeInstanceView *AbstractView::nodeInstanceView() const
{
if (model()) {
- return model()->m_d->nodeInstanceView();
+ return model()->d->nodeInstanceView();
} else {
return 0;
}
@@ -351,7 +351,7 @@ NodeInstanceView *AbstractView::nodeInstanceView() const
RewriterView *AbstractView::rewriterView() const
{
if (model()) {
- return model()->m_d->rewriterView();
+ return model()->d->rewriterView();
} else {
return 0;
}
@@ -369,7 +369,7 @@ void AbstractView::resetView()
QList<ModelNode> AbstractView::allModelNodes()
{
- return toModelNodeList(model()->m_d->allNodes());
+ return toModelNodeList(model()->d->allNodes());
}
void AbstractView::emitCustomNotification(const QString &identifier)
@@ -384,49 +384,49 @@ void AbstractView::emitCustomNotification(const QString &identifier, const QList
void AbstractView::emitCustomNotification(const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data)
{
- model()->m_d->notifyCustomNotification(this, identifier, nodeList, data);
+ model()->d->notifyCustomNotification(this, identifier, nodeList, data);
}
void AbstractView::emitInstancePropertyChange(const QList<QPair<ModelNode, QString> > &propertyList)
{
if (model() && nodeInstanceView() == this)
- model()->m_d->notifyInstancePropertyChange(propertyList);
+ model()->d->notifyInstancePropertyChange(propertyList);
}
void AbstractView::emitInstancesCompleted(const QVector<ModelNode> &nodeVector)
{
if (model() && nodeInstanceView() == this)
- model()->m_d->notifyInstancesCompleted(nodeVector);
+ model()->d->notifyInstancesCompleted(nodeVector);
}
void AbstractView::emitInstanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash)
{
if (model() && nodeInstanceView() == this)
- model()->m_d->notifyInstancesInformationsChange(informationChangeHash);
+ model()->d->notifyInstancesInformationsChange(informationChangeHash);
}
void AbstractView::emitInstancesRenderImageChanged(const QVector<ModelNode> &nodeVector)
{
if (model() && nodeInstanceView() == this)
- model()->m_d->notifyInstancesRenderImageChanged(nodeVector);
+ model()->d->notifyInstancesRenderImageChanged(nodeVector);
}
void AbstractView::emitInstancesPreviewImageChanged(const QVector<ModelNode> &nodeVector)
{
if (model() && nodeInstanceView() == this)
- model()->m_d->notifyInstancesPreviewImageChanged(nodeVector);
+ model()->d->notifyInstancesPreviewImageChanged(nodeVector);
}
void AbstractView::emitInstancesChildrenChanged(const QVector<ModelNode> &nodeVector)
{
if (model() && nodeInstanceView() == this)
- model()->m_d->notifyInstancesChildrenChanged(nodeVector);
+ model()->d->notifyInstancesChildrenChanged(nodeVector);
}
void AbstractView::emitRewriterBeginTransaction()
{
if (model())
- model()->m_d->notifyRewriterBeginTransaction();
+ model()->d->notifyRewriterBeginTransaction();
}
void AbstractView::sendTokenToInstances(const QString &token, int number, const QVector<ModelNode> &nodeVector)
@@ -438,33 +438,33 @@ void AbstractView::sendTokenToInstances(const QString &token, int number, const
void AbstractView::emitInstanceToken(const QString &token, int number, const QVector<ModelNode> &nodeVector)
{
if (nodeInstanceView())
- model()->m_d->notifyInstanceToken(token, number, nodeVector);
+ model()->d->notifyInstanceToken(token, number, nodeVector);
}
void AbstractView::emitRewriterEndTransaction()
{
if (model())
- model()->m_d->notifyRewriterEndTransaction();
+ model()->d->notifyRewriterEndTransaction();
}
void AbstractView::setAcutalStateNode(const ModelNode &node)
{
Internal::WriteLocker locker(m_model.data());
if (model())
- model()->m_d->notifyActualStateChanged(node);
+ model()->d->notifyActualStateChanged(node);
}
void AbstractView::changeRootNodeType(const QString &type, int majorVersion, int minorVersion)
{
Internal::WriteLocker locker(m_model.data());
- m_model.data()->m_d->changeRootNodeType(type, majorVersion, minorVersion);
+ m_model.data()->d->changeRootNodeType(type, majorVersion, minorVersion);
}
ModelNode AbstractView::actualStateNode() const
{
if (model())
- return ModelNode(m_model.data()->m_d->actualStateNode(), m_model.data(), const_cast<AbstractView*>(this));
+ return ModelNode(m_model.data()->d->actualStateNode(), m_model.data(), const_cast<AbstractView*>(this));
return ModelNode();
}
diff --git a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
index 4c988fa959..dfebf33b47 100644
--- a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
@@ -81,9 +81,9 @@ void BindingProperty::setExpression(const QString &expression)
}
if (internalNode()->hasProperty(name()) && !internalNode()->property(name())->isBindingProperty())
- model()->m_d->removeProperty(internalNode()->property(name()));
+ model()->d->removeProperty(internalNode()->property(name()));
- model()->m_d->setBindingProperty(internalNode(), name(), expression);
+ model()->d->setBindingProperty(internalNode(), name(), expression);
}
QString BindingProperty::expression() const
@@ -229,9 +229,9 @@ void BindingProperty::setDynamicTypeNameAndExpression(const QString &typeName, c
}
if (internalNode()->hasProperty(name()) && !internalNode()->property(name())->isBindingProperty())
- model()->m_d->removeProperty(internalNode()->property(name()));
+ model()->d->removeProperty(internalNode()->property(name()));
- model()->m_d->setDynamicBindingProperty(internalNode(), name(), typeName, expression);
+ model()->d->setDynamicBindingProperty(internalNode(), name(), typeName, expression);
}
BindingProperty& BindingProperty::operator= (const QPair<QString, QString> &typeExpressionPair)
diff --git a/src/plugins/qmldesigner/designercore/model/model.cpp b/src/plugins/qmldesigner/designercore/model/model.cpp
index a780dcf6d5..a84da79c2f 100644
--- a/src/plugins/qmldesigner/designercore/model/model.cpp
+++ b/src/plugins/qmldesigner/designercore/model/model.cpp
@@ -126,10 +126,10 @@ Model *ModelPrivate::create(QString type, int major, int minor, Model *metaInfoP
{
Model *model = new Model;
- model->m_d->m_metaInfoProxyModel = metaInfoPropxyModel;
- model->m_d->rootNode()->setType(type);
- model->m_d->rootNode()->setMajorVersion(major);
- model->m_d->rootNode()->setMinorVersion(minor);
+ model->d->m_metaInfoProxyModel = metaInfoPropxyModel;
+ model->d->rootNode()->setType(type);
+ model->d->rootNode()->setMajorVersion(major);
+ model->d->rootNode()->setMinorVersion(minor);
return model;
}
@@ -1659,9 +1659,9 @@ WriteLocker::WriteLocker(ModelPrivate *model)
}
WriteLocker::WriteLocker(Model *model)
- : m_model(model->m_d)
+ : m_model(model->d)
{
- Q_ASSERT(model->m_d);
+ Q_ASSERT(model->d);
if (m_model->m_writeLock)
qWarning() << "QmlDesigner: Misbehaving view calls back to model!!!";
// FIXME: Enable it again
@@ -1716,14 +1716,14 @@ WriteLocker::~WriteLocker()
Model::Model() :
QObject(),
- m_d(new Internal::ModelPrivate(this))
+ d(new Internal::ModelPrivate(this))
{
}
Model::~Model()
{
- delete m_d;
+ delete d;
}
@@ -1755,12 +1755,12 @@ Model *Model::create(QString type, int major, int minor, Model *metaInfoPropxyMo
// = componentNode.baseNodeState().m_internalNodeState->propertyLocation("data");
//
// TextModifier *textModifier
-// = new Internal::ComponentTextModifier(m_d->m_rewriter->textModifier(),
+// = new Internal::ComponentTextModifier(d->m_rewriter->textModifier(),
// componentRootLocation,
-// m_d->m_rootInternalNode->baseNodeState()->location());
+// d->m_rootInternalNode->baseNodeState()->location());
//
// QList<QDeclarativeError> errors;
-// Model *subModel = create(textModifier, m_d->m_fileUrl, &errors);
+// Model *subModel = create(textModifier, d->m_fileUrl, &errors);
//
// Q_ASSERT(subModel);
// Q_ASSERT(errors.size() == 0); // should never happen, after all it was already compiled!
@@ -1772,12 +1772,12 @@ Model *Model::create(QString type, int major, int minor, Model *metaInfoPropxyMo
QList<Import> Model::imports() const
{
- return m_d->imports();
+ return d->imports();
}
void Model::changeImports(const QList<Import> &importsToBeAdded, const QList<Import> &importsToBeRemoved)
{
- m_d->changeImports(importsToBeAdded, importsToBeRemoved);
+ d->changeImports(importsToBeAdded, importsToBeRemoved);
}
@@ -1832,7 +1832,7 @@ bool Model::hasImport(const Import &import, bool ignoreAlias, bool allowHigherVe
RewriterView *Model::rewriterView() const
{
- return m_d->rewriterView();
+ return d->rewriterView();
}
/*!
@@ -1841,8 +1841,8 @@ RewriterView *Model::rewriterView() const
*/
Model *Model::metaInfoProxyModel()
{
- if (m_d->m_metaInfoProxyModel)
- return m_d->m_metaInfoProxyModel->metaInfoProxyModel();
+ if (d->m_metaInfoProxyModel)
+ return d->m_metaInfoProxyModel->metaInfoProxyModel();
else
return this;
}
@@ -1862,12 +1862,12 @@ Model *Model::create(const QString &rootType)
Model *Model::masterModel() const
{
- return m_d->m_masterModel.data();
+ return d->m_masterModel.data();
}
void Model::setMasterModel(Model *model)
{
- m_d->m_masterModel = model;
+ d->m_masterModel = model;
}
/*!
@@ -1876,7 +1876,7 @@ void Model::setMasterModel(Model *model)
*/
QUrl Model::fileUrl() const
{
- return m_d->fileUrl();
+ return d->fileUrl();
}
/*!
@@ -1885,8 +1885,8 @@ QUrl Model::fileUrl() const
*/
void Model::setFileUrl(const QUrl &url)
{
- Internal::WriteLocker locker(m_d);
- m_d->setFileUrl(url);
+ Internal::WriteLocker locker(d);
+ d->setFileUrl(url);
}
/*!
@@ -1894,7 +1894,7 @@ void Model::setFileUrl(const QUrl &url)
*/
const MetaInfo Model::metaInfo() const
{
- return m_d->metaInfo();
+ return d->metaInfo();
}
bool Model::hasNodeMetaInfo(const QString &typeName, int majorVersion, int minorVersion)
@@ -1912,7 +1912,7 @@ NodeMetaInfo Model::metaInfo(const QString &typeName, int majorVersion, int mino
*/
MetaInfo Model::metaInfo()
{
- return m_d->metaInfo();
+ return d->metaInfo();
}
/*! \name Undo Redo Interface
@@ -1936,20 +1936,20 @@ The view is informed that it has been registered within the model by a call to A
*/
void Model::attachView(AbstractView *view)
{
-// Internal::WriteLocker locker(m_d);
+// Internal::WriteLocker locker(d);
RewriterView *rewriterView = qobject_cast<RewriterView*>(view);
if (rewriterView) {
- m_d->setRewriterView(rewriterView);
+ d->setRewriterView(rewriterView);
return;
}
NodeInstanceView *nodeInstanceView = qobject_cast<NodeInstanceView*>(view);
if (nodeInstanceView) {
- m_d->setNodeInstanceView(nodeInstanceView);
+ d->setNodeInstanceView(nodeInstanceView);
return;
}
- m_d->attachView(view);
+ d->attachView(view);
}
/*!
@@ -1962,22 +1962,22 @@ void Model::attachView(AbstractView *view)
*/
void Model::detachView(AbstractView *view, ViewNotification emitDetachNotify)
{
-// Internal::WriteLocker locker(m_d);
+// Internal::WriteLocker locker(d);
bool emitNotify = (emitDetachNotify == NotifyView);
RewriterView *rewriterView = qobject_cast<RewriterView*>(view);
if (rewriterView) {
- m_d->setRewriterView(0);
+ d->setRewriterView(0);
return;
}
NodeInstanceView *nodeInstanceView = qobject_cast<NodeInstanceView*>(view);
if (nodeInstanceView) {
- m_d->setNodeInstanceView(0);
+ d->setNodeInstanceView(0);
return;
}
- m_d->detachView(view, emitNotify);
+ d->detachView(view, emitNotify);
}
diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
index ab16ec6e19..981f4e81f7 100644
--- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp
+++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
@@ -200,7 +200,7 @@ void ModelNode::setId(const QString& id)
if (view()->hasId(id))
throw InvalidIdException(__LINE__, __FUNCTION__, __FILE__, id, InvalidIdException::DuplicateId);
- m_model.data()->m_d->changeNodeId(internalNode(), id);
+ m_model.data()->d->changeNodeId(internalNode(), id);
}
/*! \brief the fully-qualified type name of the node is represented as string
@@ -565,10 +565,10 @@ void ModelNode::removeProperty(const QString &name)
if (!isValid())
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
- model()->m_d->checkPropertyName(name);
+ model()->d->checkPropertyName(name);
if (internalNode()->hasProperty(name))
- model()->m_d->removeProperty(internalNode()->property(name));
+ model()->d->removeProperty(internalNode()->property(name));
}
@@ -613,7 +613,7 @@ void ModelNode::destroy()
}
removeModelNodeFromSelection(*this);
- model()->m_d->removeNode(internalNode());
+ model()->d->removeNode(internalNode());
}
//\}
@@ -906,7 +906,7 @@ QVariant ModelNode::auxiliaryData(const QString &name) const
void ModelNode::setAuxiliaryData(const QString &name, const QVariant &data) const
{
Internal::WriteLocker locker(m_model.data());
- m_model.data()->m_d->setAuxiliaryData(internalNode(), name, data);
+ m_model.data()->d->setAuxiliaryData(internalNode(), name, data);
}
bool ModelNode::hasAuxiliaryData(const QString &name) const
@@ -929,7 +929,7 @@ QHash<QString, QVariant> ModelNode::auxiliaryData() const
void ModelNode::setScriptFunctions(const QStringList &scriptFunctionList)
{
- model()->m_d->setScriptFunctions(internalNode(), scriptFunctionList);
+ model()->d->setScriptFunctions(internalNode(), scriptFunctionList);
}
QStringList ModelNode::scriptFunctions() const
@@ -957,7 +957,7 @@ void ModelNode::setNodeSource(const QString &newNodeSource)
if (internalNode()->nodeSource() == newNodeSource)
return;
- m_model.data()->m_d->setNodeSource(internalNode(), newNodeSource);
+ m_model.data()->d->setNodeSource(internalNode(), newNodeSource);
}
QString ModelNode::nodeSource() const
diff --git a/src/plugins/qmldesigner/designercore/model/nodeabstractproperty.cpp b/src/plugins/qmldesigner/designercore/model/nodeabstractproperty.cpp
index 8ebd1d4a7e..26e4f96d7e 100644
--- a/src/plugins/qmldesigner/designercore/model/nodeabstractproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/nodeabstractproperty.cpp
@@ -87,18 +87,18 @@ void NodeAbstractProperty::reparentHere(const ModelNode &modelNode, bool isNode
throw InvalidReparentingException(__LINE__, __FUNCTION__, __FILE__);
if (internalNode()->hasProperty(name()) && !internalNode()->property(name())->isNodeAbstractProperty())
- model()->m_d->removeProperty(internalNode()->property(name()));
+ model()->d->removeProperty(internalNode()->property(name()));
if (modelNode.hasParentProperty()) {
Internal::InternalNodeAbstractProperty::Pointer oldParentProperty = modelNode.internalNode()->parentProperty();
- model()->m_d->reparentNode(internalNode(), name(), modelNode.internalNode(), isNodeList);
+ model()->d->reparentNode(internalNode(), name(), modelNode.internalNode(), isNodeList);
Q_ASSERT(!oldParentProperty.isNull());
} else {
- model()->m_d->reparentNode(internalNode(), name(), modelNode.internalNode(), isNodeList);
+ model()->d->reparentNode(internalNode(), name(), modelNode.internalNode(), isNodeList);
}
}
diff --git a/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp b/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp
index 8269dc915b..c235927c54 100644
--- a/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp
@@ -110,7 +110,7 @@ void NodeListProperty::slide(int from, int to) const
if (to > toModelNodeList().count() - 1)
throw InvalidPropertyException(__LINE__, __FUNCTION__, __FILE__, "<invalid node list sliding>");
- model()->m_d->changeNodeOrder(internalNode(), name(), from, to);
+ model()->d->changeNodeOrder(internalNode(), name(), from, to);
}
void NodeListProperty::reparentHere(const ModelNode &modelNode)
diff --git a/src/plugins/qmldesigner/designercore/model/nodeproperty.cpp b/src/plugins/qmldesigner/designercore/model/nodeproperty.cpp
index f702f42f33..5d531f08df 100644
--- a/src/plugins/qmldesigner/designercore/model/nodeproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/nodeproperty.cpp
@@ -67,9 +67,9 @@ void NodeProperty::setModelNode(const ModelNode &modelNode)
}
if (internalNode()->hasProperty(name()) && !internalNode()->property(name())->isNodeProperty())
- model()->m_d->removeProperty(internalNode()->property(name()));
+ model()->d->removeProperty(internalNode()->property(name()));
- model()->m_d->reparentNode(internalNode(), name(), modelNode.internalNode(), false); //### we have to add a flag that this is not a list
+ model()->d->reparentNode(internalNode(), name(), modelNode.internalNode(), false); //### we have to add a flag that this is not a list
}
ModelNode NodeProperty::modelNode() const
diff --git a/src/plugins/qmldesigner/designercore/model/variantproperty.cpp b/src/plugins/qmldesigner/designercore/model/variantproperty.cpp
index 9b446ae5f3..4a4ad67223 100644
--- a/src/plugins/qmldesigner/designercore/model/variantproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/variantproperty.cpp
@@ -77,9 +77,9 @@ void VariantProperty::setValue(const QVariant &value)
}
if (internalNode()->hasProperty(name()) && !internalNode()->property(name())->isVariantProperty())
- model()->m_d->removeProperty(internalNode()->property(name()));
+ model()->d->removeProperty(internalNode()->property(name()));
- model()->m_d->setVariantProperty(internalNode(), name(), value);
+ model()->d->setVariantProperty(internalNode(), name(), value);
}
QVariant VariantProperty::value() const
@@ -119,9 +119,9 @@ void VariantProperty::setDynamicTypeNameAndValue(const QString &type, const QVar
}
if (internalNode()->hasProperty(name()) && !internalNode()->property(name())->isVariantProperty())
- model()->m_d->removeProperty(internalNode()->property(name()));
+ model()->d->removeProperty(internalNode()->property(name()));
- model()->m_d->setDynamicVariantProperty(internalNode(), name(), type, value);
+ model()->d->setDynamicVariantProperty(internalNode(), name(), type, value);
}
VariantProperty& VariantProperty::operator= (const QPair<QString, QVariant> &typeValuePair)
diff --git a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.cpp b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.cpp
index a17abfc456..cc4d8af08e 100644
--- a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.cpp
+++ b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.cpp
@@ -62,13 +62,13 @@ public:
};
WidgetPluginManager::WidgetPluginManager() :
- m_d(new WidgetPluginManagerPrivate)
+ d(new WidgetPluginManagerPrivate)
{
}
WidgetPluginManager::~WidgetPluginManager()
{
- delete m_d;
+ delete d;
}
WidgetPluginManager::IWidgetPluginList WidgetPluginManager::instances()
@@ -76,8 +76,8 @@ WidgetPluginManager::IWidgetPluginList WidgetPluginManager::instances()
if (debug)
qDebug() << '>' << Q_FUNC_INFO << QLibraryInfo::buildKey();
IWidgetPluginList rc;
- const WidgetPluginManagerPrivate::PluginPathList::iterator end = m_d->m_paths.end();
- for (WidgetPluginManagerPrivate::PluginPathList::iterator it = m_d->m_paths.begin(); it != end; ++it)
+ const WidgetPluginManagerPrivate::PluginPathList::iterator end = d->m_paths.end();
+ for (WidgetPluginManagerPrivate::PluginPathList::iterator it = d->m_paths.begin(); it != end; ++it)
it->getInstances(&rc);
if (debug)
qDebug() << '<' << Q_FUNC_INFO << rc.size();
@@ -89,15 +89,15 @@ bool WidgetPluginManager::addPath(const QString &path)
const QDir dir(path);
if (!dir.exists())
return false;
- m_d->m_paths.push_back(WidgetPluginPath(dir));
+ d->m_paths.push_back(WidgetPluginPath(dir));
return true;
}
QAbstractItemModel *WidgetPluginManager::createModel(QObject *parent)
{
QStandardItemModel *model = new QStandardItemModel(parent);
- const WidgetPluginManagerPrivate::PluginPathList::iterator end = m_d->m_paths.end();
- for (WidgetPluginManagerPrivate::PluginPathList::iterator it = m_d->m_paths.begin(); it != end; ++it)
+ const WidgetPluginManagerPrivate::PluginPathList::iterator end = d->m_paths.end();
+ for (WidgetPluginManagerPrivate::PluginPathList::iterator it = d->m_paths.begin(); it != end; ++it)
model->appendRow(it->createModelItem());
return model;
}
diff --git a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h
index 8cb0657082..f2fc5f6776 100644
--- a/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h
+++ b/src/plugins/qmldesigner/designercore/pluginmanager/widgetpluginmanager.h
@@ -71,7 +71,7 @@ public:
QAbstractItemModel *createModel(QObject *parent = 0);
private:
- WidgetPluginManagerPrivate *m_d;
+ WidgetPluginManagerPrivate *d;
};
} // namespace Internal