Commit 28535f75 authored by hjk's avatar hjk Committed by hjk
Browse files

utils, qmljstools, vcsbase: s/\bm_d\b/d/g

Change-Id: I4678e9188b8f630aa3a3221be348984cdc7699dd
Reviewed-on: http://codereview.qt-project.org/4992

Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 40838800
......@@ -155,7 +155,7 @@ QVariant EnvironmentModel::data(const QModelIndex &index, int role) const
}
}
if (role == Qt::FontRole) {
// check whether this environment variable exists in m_d->m_items
// check whether this environment variable exists in d->m_items
if (changes(d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row()))) {
QFont f;
f.setBold(true);
......@@ -320,7 +320,7 @@ void EnvironmentModel::unsetVariable(const QString &name)
if (row < 0)
return;
// look in m_d->m_items for the variable
// look in d->m_items for the variable
int pos = d->findInChanges(name);
if (pos != -1) {
d->m_items[pos].unset = true;
......
......@@ -125,22 +125,22 @@ bool FancyLineEditPrivate::eventFilter(QObject *obj, QEvent *event)
// --------- FancyLineEdit
FancyLineEdit::FancyLineEdit(QWidget *parent) :
QLineEdit(parent),
m_d(new FancyLineEditPrivate(this))
d(new FancyLineEditPrivate(this))
{
ensurePolished();
updateMargins();
connect(this, SIGNAL(textChanged(QString)), this, SLOT(checkButtons(QString)));
connect(m_d->m_iconbutton[Left], SIGNAL(clicked()), this, SLOT(iconClicked()));
connect(m_d->m_iconbutton[Right], SIGNAL(clicked()), this, SLOT(iconClicked()));
connect(d->m_iconbutton[Left], SIGNAL(clicked()), this, SLOT(iconClicked()));
connect(d->m_iconbutton[Right], SIGNAL(clicked()), this, SLOT(iconClicked()));
}
void FancyLineEdit::checkButtons(const QString &text)
{
if (m_oldText.isEmpty() || text.isEmpty()) {
for (int i = 0; i < 2; ++i) {
if (m_d->m_iconbutton[i]->hasAutoHide())
m_d->m_iconbutton[i]->animateShow(!text.isEmpty());
if (d->m_iconbutton[i]->hasAutoHide())
d->m_iconbutton[i]->animateShow(!text.isEmpty());
}
m_oldText = text;
}
......@@ -152,14 +152,14 @@ FancyLineEdit::~FancyLineEdit()
void FancyLineEdit::setButtonVisible(Side side, bool visible)
{
m_d->m_iconbutton[side]->setVisible(visible);
m_d->m_iconEnabled[side] = visible;
d->m_iconbutton[side]->setVisible(visible);
d->m_iconEnabled[side] = visible;
updateMargins();
}
bool FancyLineEdit::isButtonVisible(Side side) const
{
return m_d->m_iconEnabled[side];
return d->m_iconEnabled[side];
}
void FancyLineEdit::iconClicked()
......@@ -167,12 +167,12 @@ void FancyLineEdit::iconClicked()
IconButton *button = qobject_cast<IconButton *>(sender());
int index = -1;
for (int i = 0; i < 2; ++i)
if (m_d->m_iconbutton[i] == button)
if (d->m_iconbutton[i] == button)
index = i;
if (index == -1)
return;
if (m_d->m_menu[index]) {
m_d->m_menu[index]->exec(QCursor::pos());
if (d->m_menu[index]) {
d->m_menu[index]->exec(QCursor::pos());
} else {
emit buttonClicked((Side)index);
if (index == Left)
......@@ -188,16 +188,16 @@ void FancyLineEdit::updateMargins()
Side realLeft = (leftToRight ? Left : Right);
Side realRight = (leftToRight ? Right : Left);
int leftMargin = m_d->m_iconbutton[realLeft]->pixmap().width() + 8;
int rightMargin = m_d->m_iconbutton[realRight]->pixmap().width() + 8;
int leftMargin = d->m_iconbutton[realLeft]->pixmap().width() + 8;
int rightMargin = d->m_iconbutton[realRight]->pixmap().width() + 8;
// Note KDE does not reserve space for the highlight color
if (style()->inherits("OxygenStyle")) {
leftMargin = qMax(24, leftMargin);
rightMargin = qMax(24, rightMargin);
}
QMargins margins((m_d->m_iconEnabled[realLeft] ? leftMargin : 0), 0,
(m_d->m_iconEnabled[realRight] ? rightMargin : 0), 0);
QMargins margins((d->m_iconEnabled[realLeft] ? leftMargin : 0), 0,
(d->m_iconEnabled[realRight] ? rightMargin : 0), 0);
setTextMargins(margins);
}
......@@ -212,10 +212,10 @@ void FancyLineEdit::updateButtonPositions()
if (iconpos == FancyLineEdit::Right) {
const int iconoffset = textMargins().right() + 4;
m_d->m_iconbutton[i]->setGeometry(contentRect.adjusted(width() - iconoffset, 0, 0, 0));
d->m_iconbutton[i]->setGeometry(contentRect.adjusted(width() - iconoffset, 0, 0, 0));
} else {
const int iconoffset = textMargins().left() + 4;
m_d->m_iconbutton[i]->setGeometry(contentRect.adjusted(0, 0, -width() + iconoffset, 0));
d->m_iconbutton[i]->setGeometry(contentRect.adjusted(0, 0, -width() + iconoffset, 0));
}
}
}
......@@ -227,7 +227,7 @@ void FancyLineEdit::resizeEvent(QResizeEvent *)
void FancyLineEdit::setButtonPixmap(Side side, const QPixmap &buttonPixmap)
{
m_d->m_iconbutton[side]->setPixmap(buttonPixmap);
d->m_iconbutton[side]->setPixmap(buttonPixmap);
updateMargins();
updateButtonPositions();
update();
......@@ -235,56 +235,56 @@ void FancyLineEdit::setButtonPixmap(Side side, const QPixmap &buttonPixmap)
QPixmap FancyLineEdit::buttonPixmap(Side side) const
{
return m_d->m_pixmap[side];
return d->m_pixmap[side];
}
void FancyLineEdit::setButtonMenu(Side side, QMenu *buttonMenu)
{
m_d->m_menu[side] = buttonMenu;
m_d->m_iconbutton[side]->setIconOpacity(1.0);
d->m_menu[side] = buttonMenu;
d->m_iconbutton[side]->setIconOpacity(1.0);
}
QMenu *FancyLineEdit::buttonMenu(Side side) const
{
return m_d->m_menu[side];
return d->m_menu[side];
}
bool FancyLineEdit::hasMenuTabFocusTrigger(Side side) const
{
return m_d->m_menuTabFocusTrigger[side];
return d->m_menuTabFocusTrigger[side];
}
void FancyLineEdit::setMenuTabFocusTrigger(Side side, bool v)
{
if (m_d->m_menuTabFocusTrigger[side] == v)
if (d->m_menuTabFocusTrigger[side] == v)
return;
m_d->m_menuTabFocusTrigger[side] = v;
m_d->m_iconbutton[side]->setFocusPolicy(v ? Qt::TabFocus : Qt::NoFocus);
d->m_menuTabFocusTrigger[side] = v;
d->m_iconbutton[side]->setFocusPolicy(v ? Qt::TabFocus : Qt::NoFocus);
}
bool FancyLineEdit::hasAutoHideButton(Side side) const
{
return m_d->m_iconbutton[side]->hasAutoHide();
return d->m_iconbutton[side]->hasAutoHide();
}
void FancyLineEdit::setAutoHideButton(Side side, bool h)
{
m_d->m_iconbutton[side]->setAutoHide(h);
d->m_iconbutton[side]->setAutoHide(h);
if (h)
m_d->m_iconbutton[side]->setIconOpacity(text().isEmpty() ? 0.0 : 1.0);
d->m_iconbutton[side]->setIconOpacity(text().isEmpty() ? 0.0 : 1.0);
else
m_d->m_iconbutton[side]->setIconOpacity(1.0);
d->m_iconbutton[side]->setIconOpacity(1.0);
}
void FancyLineEdit::setButtonToolTip(Side side, const QString &tip)
{
m_d->m_iconbutton[side]->setToolTip(tip);
d->m_iconbutton[side]->setToolTip(tip);
}
void FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)
{
m_d->m_iconbutton[side]->setFocusPolicy(policy);
d->m_iconbutton[side]->setFocusPolicy(policy);
}
// IconButton - helper class to represent a clickable icon
......
......@@ -113,7 +113,7 @@ private:
void updateButtonPositions();
friend class Utils::FancyLineEditPrivate;
FancyLineEditPrivate *m_d;
FancyLineEditPrivate *d;
QString m_oldText;
};
......
......@@ -63,7 +63,7 @@ public:
private:
// not used atm
IWelcomePagePrivate *m_d;
IWelcomePagePrivate *d;
};
}
......
......@@ -345,48 +345,48 @@ struct BaseFileWizardPrivate
BaseFileWizard::BaseFileWizard(const BaseFileWizardParameters &parameters,
QObject *parent) :
IWizard(parent),
m_d(new BaseFileWizardPrivate(parameters))
d(new BaseFileWizardPrivate(parameters))
{
}
BaseFileWizard::~BaseFileWizard()
{
delete m_d;
delete d;
}
IWizard::WizardKind BaseFileWizard::kind() const
{
return m_d->m_parameters.kind();
return d->m_parameters.kind();
}
QIcon BaseFileWizard::icon() const
{
return m_d->m_parameters.icon();
return d->m_parameters.icon();
}
QString BaseFileWizard::description() const
{
return m_d->m_parameters.description();
return d->m_parameters.description();
}
QString BaseFileWizard::displayName() const
{
return m_d->m_parameters.displayName();
return d->m_parameters.displayName();
}
QString BaseFileWizard::id() const
{
return m_d->m_parameters.id();
return d->m_parameters.id();
}
QString BaseFileWizard::category() const
{
return m_d->m_parameters.category();
return d->m_parameters.category();
}
QString BaseFileWizard::displayCategory() const
{
return m_d->m_parameters.displayCategory();
return d->m_parameters.displayCategory();
}
void BaseFileWizard::runWizard(const QString &path, QWidget *parent)
......
......@@ -143,7 +143,7 @@ protected:
static bool postGenerateOpenEditors(const GeneratedFiles &l, QString *errorMessage = 0);
private:
BaseFileWizardPrivate *m_d;
BaseFileWizardPrivate *d;
};
class CORE_EXPORT StandardFileWizard : public BaseFileWizard
......
......@@ -60,7 +60,7 @@ QmlJSToolsSettings *QmlJSToolsSettings::m_instance = 0;
QmlJSToolsSettings::QmlJSToolsSettings(QObject *parent)
: QObject(parent)
, m_d(new Internal::QmlJSToolsSettingsPrivate)
, d(new Internal::QmlJSToolsSettingsPrivate)
{
QTC_ASSERT(!m_instance, return);
m_instance = this;
......@@ -68,21 +68,21 @@ QmlJSToolsSettings::QmlJSToolsSettings(QObject *parent)
if (const QSettings *s = Core::ICore::instance()->settings()) {
TextEditor::TextEditorSettings *textEditorSettings = TextEditor::TextEditorSettings::instance();
TextEditor::TabPreferences *tabPrefs = textEditorSettings->tabPreferences();
m_d->m_tabPreferences
d->m_tabPreferences
= new TextEditor::TabPreferences(QList<TextEditor::IFallbackPreferences *>()
<< tabPrefs, this);
m_d->m_tabPreferences->setCurrentFallback(tabPrefs);
m_d->m_tabPreferences->setFallbackEnabled(tabPrefs, false);
m_d->m_tabPreferences->fromSettings(QmlJSTools::Constants::QML_JS_SETTINGS_ID, s);
m_d->m_tabPreferences->setDisplayName(tr("Global Qt Quick", "Settings"));
m_d->m_tabPreferences->setId(idKey);
textEditorSettings->registerLanguageTabPreferences(QmlJSTools::Constants::QML_JS_SETTINGS_ID, m_d->m_tabPreferences);
d->m_tabPreferences->setCurrentFallback(tabPrefs);
d->m_tabPreferences->setFallbackEnabled(tabPrefs, false);
d->m_tabPreferences->fromSettings(QmlJSTools::Constants::QML_JS_SETTINGS_ID, s);
d->m_tabPreferences->setDisplayName(tr("Global Qt Quick", "Settings"));
d->m_tabPreferences->setId(idKey);
textEditorSettings->registerLanguageTabPreferences(QmlJSTools::Constants::QML_JS_SETTINGS_ID, d->m_tabPreferences);
}
}
QmlJSToolsSettings::~QmlJSToolsSettings()
{
delete m_d;
delete d;
m_instance = 0;
}
......@@ -94,7 +94,7 @@ QmlJSToolsSettings *QmlJSToolsSettings::instance()
TextEditor::TabPreferences *QmlJSToolsSettings::tabPreferences() const
{
return m_d->m_tabPreferences;
return d->m_tabPreferences;
}
......@@ -66,7 +66,7 @@ public:
TextEditor::TabPreferences *tabPreferences() const;
private:
Internal::QmlJSToolsSettingsPrivate *m_d;
Internal::QmlJSToolsSettingsPrivate *d;
static QmlJSToolsSettings *m_instance;
};
......
......@@ -79,16 +79,16 @@ class Html5AppWizardPrivate
Html5AppWizard::Html5AppWizard()
: AbstractMobileAppWizard(parameters())
, m_d(new Html5AppWizardPrivate)
, d(new Html5AppWizardPrivate)
{
m_d->app = new Html5App;
m_d->wizardDialog = 0;
d->app = new Html5App;
d->wizardDialog = 0;
}
Html5AppWizard::~Html5AppWizard()
{
delete m_d->app;
delete m_d;
delete d->app;
delete d;
}
Core::BaseFileWizardParameters Html5AppWizard::parameters()
......@@ -111,15 +111,15 @@ Core::BaseFileWizardParameters Html5AppWizard::parameters()
AbstractMobileAppWizardDialog *Html5AppWizard::createWizardDialogInternal(QWidget *parent) const
{
m_d->wizardDialog = new Html5AppWizardDialog(parent);
m_d->wizardDialog->m_htmlOptionsPage->setTouchOptimizationEndabled(
m_d->app->touchOptimizedNavigationEnabled());
return m_d->wizardDialog;
d->wizardDialog = new Html5AppWizardDialog(parent);
d->wizardDialog->m_htmlOptionsPage->setTouchOptimizationEndabled(
d->app->touchOptimizedNavigationEnabled());
return d->wizardDialog;
}
void Html5AppWizard::projectPathChanged(const QString &path) const
{
m_d->wizardDialog->targetsPage()->setProFilePath(path);
d->wizardDialog->targetsPage()->setProFilePath(path);
}
void Html5AppWizard::prepareGenerateFiles(const QWizard *w,
......@@ -127,27 +127,27 @@ void Html5AppWizard::prepareGenerateFiles(const QWizard *w,
{
Q_UNUSED(errorMessage)
const Html5AppWizardDialog *wizard = qobject_cast<const Html5AppWizardDialog*>(w);
m_d->app->setMainHtml(wizard->m_htmlOptionsPage->mainHtmlMode(),
d->app->setMainHtml(wizard->m_htmlOptionsPage->mainHtmlMode(),
wizard->m_htmlOptionsPage->mainHtmlData());
m_d->app->setTouchOptimizedNavigationEnabled(
d->app->setTouchOptimizedNavigationEnabled(
wizard->m_htmlOptionsPage->touchOptimizationEndabled());
}
QString Html5AppWizard::fileToOpenPostGeneration() const
{
return m_d->app->mainHtmlMode() == Html5App::ModeUrl ?
m_d->app->path(AbstractMobileApp::MainCpp)
: m_d->app->path(Html5App::MainHtml);
return d->app->mainHtmlMode() == Html5App::ModeUrl ?
d->app->path(AbstractMobileApp::MainCpp)
: d->app->path(Html5App::MainHtml);
}
AbstractMobileApp *Html5AppWizard::app() const
{
return m_d->app;
return d->app;
}
AbstractMobileAppWizardDialog *Html5AppWizard::wizardDialog() const
{
return m_d->wizardDialog;
return d->wizardDialog;
}
} // namespace Internal
......
......@@ -59,7 +59,7 @@ private:
virtual void prepareGenerateFiles(const QWizard *wizard,
QString *errorMessage) const;
class Html5AppWizardPrivate *m_d;
class Html5AppWizardPrivate *d;
};
} // namespace Internal
......
......@@ -77,16 +77,16 @@ class MobileAppWizardPrivate
MobileAppWizard::MobileAppWizard()
: AbstractMobileAppWizard(parameters())
, m_d(new MobileAppWizardPrivate)
, d(new MobileAppWizardPrivate)
{
m_d->mobileApp = new MobileApp;
m_d->wizardDialog = 0;
d->mobileApp = new MobileApp;
d->wizardDialog = 0;
}
MobileAppWizard::~MobileAppWizard()
{
delete m_d->mobileApp;
delete m_d;
delete d->mobileApp;
delete d;
}
Core::BaseFileWizardParameters MobileAppWizard::parameters()
......@@ -104,13 +104,13 @@ Core::BaseFileWizardParameters MobileAppWizard::parameters()
AbstractMobileAppWizardDialog *MobileAppWizard::createWizardDialogInternal(QWidget *parent) const
{
m_d->wizardDialog = new MobileAppWizardDialog(parent);
return m_d->wizardDialog;
d->wizardDialog = new MobileAppWizardDialog(parent);
return d->wizardDialog;
}
void MobileAppWizard::projectPathChanged(const QString &path) const
{
m_d->wizardDialog->targetsPage()->setProFilePath(path);
d->wizardDialog->targetsPage()->setProFilePath(path);
}
void MobileAppWizard::prepareGenerateFiles(const QWizard *w,
......@@ -127,12 +127,12 @@ QString MobileAppWizard::fileToOpenPostGeneration() const
AbstractMobileApp *MobileAppWizard::app() const
{
return m_d->mobileApp;
return d->mobileApp;
}
AbstractMobileAppWizardDialog *MobileAppWizard::wizardDialog() const
{
return m_d->wizardDialog;
return d->wizardDialog;
}
} // namespace Internal
......
......@@ -59,7 +59,7 @@ private:
virtual void prepareGenerateFiles(const QWizard *wizard,
QString *errorMessage) const;
class MobileAppWizardPrivate *m_d;
class MobileAppWizardPrivate *d;
};
} // namespace Internal
......
......@@ -114,16 +114,16 @@ class QtQuickAppWizardPrivate
QtQuickAppWizard::QtQuickAppWizard()
: AbstractMobileAppWizard(parameters())
, m_d(new QtQuickAppWizardPrivate)
, d(new QtQuickAppWizardPrivate)
{
m_d->app = new QtQuickApp;
m_d->wizardDialog = 0;
d->app = new QtQuickApp;
d->wizardDialog = 0;
}
QtQuickAppWizard::~QtQuickAppWizard()
{
delete m_d->app;
delete m_d;
delete d->app;
delete d;
}
Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
......@@ -148,14 +148,14 @@ Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWidget *parent) const
{
m_d->wizardDialog = new QtQuickAppWizardDialog(parent);
m_d->wizardDialog->m_componentOptionsPage->setComponentSet(m_d->app->componentSet());
return m_d->wizardDialog;
d->wizardDialog = new QtQuickAppWizardDialog(parent);
d->wizardDialog->m_componentOptionsPage->setComponentSet(d->app->componentSet());
return d->wizardDialog;
}
void QtQuickAppWizard::projectPathChanged(const QString &path) const
{
m_d->wizardDialog->targetsPage()->setProFilePath(path);
d->wizardDialog->targetsPage()->setProFilePath(path);
}
void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,
......@@ -164,29 +164,29 @@ void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,
Q_UNUSED(errorMessage)
const QtQuickAppWizardDialog *wizard = qobject_cast<const QtQuickAppWizardDialog*>(w);
if (wizard->m_componentOptionsPage->mainQmlMode() == QtQuickApp::ModeGenerate) {
m_d->app->setMainQml(QtQuickApp::ModeGenerate);
d->app->setMainQml(QtQuickApp::ModeGenerate);
} else {
const QString mainQmlFile = wizard->m_componentOptionsPage->mainQmlFile();
m_d->app->setMainQml(QtQuickApp::ModeImport, mainQmlFile);
d->app->setMainQml(QtQuickApp::ModeImport, mainQmlFile);
}
m_d->app->setComponentSet(wizard->m_componentOptionsPage->componentSet());
if (m_d->app->componentSet() == QtQuickApp::Symbian10Components)
m_d->app->setOrientation(AbstractMobileApp::ScreenOrientationImplicit);
d->app->setComponentSet(wizard->m_componentOptionsPage->componentSet());
if (d->app->componentSet() == QtQuickApp::Symbian10Components)
d->app->setOrientation(AbstractMobileApp::ScreenOrientationImplicit);
}
QString QtQuickAppWizard::fileToOpenPostGeneration() const
{
return m_d->app->path(QtQuickApp::MainQml);
return d->app->path(QtQuickApp::MainQml);
}
AbstractMobileApp *QtQuickAppWizard::app() const
{
return m_d->app;
return d->app;
}
AbstractMobileAppWizardDialog *QtQuickAppWizard::wizardDialog() const
{
return m_d->wizardDialog;
return d->wizardDialog;
}
} // namespace Internal
......
......@@ -59,7 +59,7 @@ private:
virtual void prepareGenerateFiles(const QWizard *wizard,
QString *errorMessage) const;
class QtQuickAppWizardPrivate *m_d;
class QtQuickAppWizardPrivate *d;
};
} // namespace Internal
......
......@@ -70,29 +70,29 @@ BaseVCSEditorFactoryPrivate::BaseVCSEditorFactoryPrivate(const VCSBaseEditorPara
}
BaseVCSEditorFactory::BaseVCSEditorFactory(const VCSBaseEditorParameters *t)
: m_d(new BaseVCSEditorFactoryPrivate(t))
: d(new BaseVCSEditorFactoryPrivate(t))
{
m_d->m_displayName = QCoreApplication::translate("VCS", t->displayName);
d->m_displayName = QCoreApplication::translate("VCS", t->displayName);