Commit bfd9fcbb authored by hjk's avatar hjk Committed by hjk

all: some m_d -> d style

Change-Id: Iac1f12980bf47666007817cfb2c64a6d1e9b780e
Reviewed-on: http://codereview.qt-project.org/4477Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 66ab323e
......@@ -61,18 +61,18 @@ public:
} // namespace QmlJS
Icons::Icons()
: m_d(new IconsPrivate)
: d(new IconsPrivate)
{
m_d->elementIcon = QIcon(QLatin1String(":/qmljs/images/element.png"));
m_d->propertyIcon = QIcon(QLatin1String(":/qmljs/images/property.png"));
m_d->publicMemberIcon = QIcon(QLatin1String(":/qmljs/images/publicmember.png"));
m_d->functionDeclarationIcon = QIcon(QLatin1String(":/qmljs/images/func.png"));
d->elementIcon = QIcon(QLatin1String(":/qmljs/images/element.png"));
d->propertyIcon = QIcon(QLatin1String(":/qmljs/images/property.png"));
d->publicMemberIcon = QIcon(QLatin1String(":/qmljs/images/publicmember.png"));
d->functionDeclarationIcon = QIcon(QLatin1String(":/qmljs/images/func.png"));
}
Icons::~Icons()
{
m_instance = 0;
delete m_d;
delete d;
}
Icons *Icons::instance()
......@@ -84,10 +84,10 @@ Icons *Icons::instance()
void Icons::setIconFilesPath(const QString &iconPath)
{
if (iconPath == m_d->resourcePath)
if (iconPath == d->resourcePath)
return;
m_d->resourcePath = iconPath;
d->resourcePath = iconPath;
if (debug)
qDebug() << "QmlJSIcons -" << "parsing" << iconPath;
......@@ -107,7 +107,7 @@ void Icons::setIconFilesPath(const QString &iconPath)
if (debug)
qDebug() << "QmlJSIcons - adding" << packageName << iconFile.baseName() << "icon to database";
QPair<QString,QString> element(packageName, iconFile.baseName());
m_d->iconHash.insert(element, icon);
d->iconHash.insert(element, icon);
}
}
}
......@@ -116,8 +116,8 @@ QIcon Icons::icon(const QString &packageName, const QString typeName) const
{
QPair<QString,QString> element(packageName, typeName);
if (debug)
qDebug() << "QmlJSIcons - icon for" << packageName << typeName << "requested" << m_d->iconHash.contains(element);
return m_d->iconHash.value(element);
qDebug() << "QmlJSIcons - icon for" << packageName << typeName << "requested" << d->iconHash.contains(element);
return d->iconHash.value(element);
}
QIcon Icons::icon(Node *node) const
......@@ -134,20 +134,20 @@ QIcon Icons::icon(Node *node) const
QIcon Icons::objectDefinitionIcon() const
{
return m_d->elementIcon;
return d->elementIcon;
}
QIcon Icons::scriptBindingIcon() const
{
return m_d->propertyIcon;
return d->propertyIcon;
}
QIcon Icons::publicMemberIcon() const
{
return m_d->publicMemberIcon;
return d->publicMemberIcon;
}
QIcon Icons::functionDeclarationIcon() const
{
return m_d->functionDeclarationIcon;
return d->functionDeclarationIcon;
}
......@@ -61,7 +61,7 @@ public:
private:
Icons();
static Icons *m_instance;
IconsPrivate *m_d;
IconsPrivate *d;
};
} // namespace QmlJS
......
......@@ -57,124 +57,124 @@ struct CheckableMessageBoxPrivate {
CheckableMessageBox::CheckableMessageBox(QWidget *parent) :
QDialog(parent),
m_d(new CheckableMessageBoxPrivate)
d(new CheckableMessageBoxPrivate)
{
setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_d->ui.setupUi(this);
m_d->ui.pixmapLabel->setVisible(false);
connect(m_d->ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(m_d->ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(m_d->ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(slotClicked(QAbstractButton*)));
d->ui.setupUi(this);
d->ui.pixmapLabel->setVisible(false);
connect(d->ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(d->ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(d->ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(slotClicked(QAbstractButton*)));
}
CheckableMessageBox::~CheckableMessageBox()
{
delete m_d;
delete d;
}
void CheckableMessageBox::slotClicked(QAbstractButton *b)
{
m_d->clickedButton = b;
d->clickedButton = b;
}
QAbstractButton *CheckableMessageBox::clickedButton() const
{
return m_d->clickedButton;
return d->clickedButton;
}
QDialogButtonBox::StandardButton CheckableMessageBox::clickedStandardButton() const
{
if (m_d->clickedButton)
return m_d->ui.buttonBox->standardButton(m_d->clickedButton);
if (d->clickedButton)
return d->ui.buttonBox->standardButton(d->clickedButton);
return QDialogButtonBox::NoButton;
}
QString CheckableMessageBox::text() const
{
return m_d->ui.messageLabel->text();
return d->ui.messageLabel->text();
}
void CheckableMessageBox::setText(const QString &t)
{
m_d->ui.messageLabel->setText(t);
d->ui.messageLabel->setText(t);
}
QPixmap CheckableMessageBox::iconPixmap() const
{
if (const QPixmap *p = m_d->ui.pixmapLabel->pixmap())
if (const QPixmap *p = d->ui.pixmapLabel->pixmap())
return QPixmap(*p);
return QPixmap();
}
void CheckableMessageBox::setIconPixmap(const QPixmap &p)
{
m_d->ui.pixmapLabel->setPixmap(p);
m_d->ui.pixmapLabel->setVisible(!p.isNull());
d->ui.pixmapLabel->setPixmap(p);
d->ui.pixmapLabel->setVisible(!p.isNull());
}
bool CheckableMessageBox::isChecked() const
{
return m_d->ui.checkBox->isChecked();
return d->ui.checkBox->isChecked();
}
void CheckableMessageBox::setChecked(bool s)
{
m_d->ui.checkBox->setChecked(s);
d->ui.checkBox->setChecked(s);
}
QString CheckableMessageBox::checkBoxText() const
{
return m_d->ui.checkBox->text();
return d->ui.checkBox->text();
}
void CheckableMessageBox::setCheckBoxText(const QString &t)
{
m_d->ui.checkBox->setText(t);
d->ui.checkBox->setText(t);
}
bool CheckableMessageBox::isCheckBoxVisible() const
{
return m_d->ui.checkBox->isVisible();
return d->ui.checkBox->isVisible();
}
void CheckableMessageBox::setCheckBoxVisible(bool v)
{
m_d->ui.checkBox->setVisible(v);
d->ui.checkBox->setVisible(v);
}
QDialogButtonBox::StandardButtons CheckableMessageBox::standardButtons() const
{
return m_d->ui.buttonBox->standardButtons();
return d->ui.buttonBox->standardButtons();
}
void CheckableMessageBox::setStandardButtons(QDialogButtonBox::StandardButtons s)
{
m_d->ui.buttonBox->setStandardButtons(s);
d->ui.buttonBox->setStandardButtons(s);
}
QPushButton *CheckableMessageBox::button(QDialogButtonBox::StandardButton b) const
{
return m_d->ui.buttonBox->button(b);
return d->ui.buttonBox->button(b);
}
QPushButton *CheckableMessageBox::addButton(const QString &text, QDialogButtonBox::ButtonRole role)
{
return m_d->ui.buttonBox->addButton(text, role);
return d->ui.buttonBox->addButton(text, role);
}
QDialogButtonBox::StandardButton CheckableMessageBox::defaultButton() const
{
foreach (QAbstractButton *b, m_d->ui.buttonBox->buttons())
foreach (QAbstractButton *b, d->ui.buttonBox->buttons())
if (QPushButton *pb = qobject_cast<QPushButton *>(b))
if (pb->isDefault())
return m_d->ui.buttonBox->standardButton(pb);
return d->ui.buttonBox->standardButton(pb);
return QDialogButtonBox::NoButton;
}
void CheckableMessageBox::setDefaultButton(QDialogButtonBox::StandardButton s)
{
if (QPushButton *b = m_d->ui.buttonBox->button(s)) {
if (QPushButton *b = d->ui.buttonBox->button(s)) {
b->setDefault(true);
b->setFocus();
}
......
......@@ -100,7 +100,7 @@ private slots:
void slotClicked(QAbstractButton *b);
private:
CheckableMessageBoxPrivate *m_d;
CheckableMessageBoxPrivate *d;
};
} // namespace Utils
......
......@@ -68,28 +68,28 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
// --------------------- ClassNameValidatingLineEdit
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
Utils::BaseValidatingLineEdit(parent),
m_d(new ClassNameValidatingLineEditPrivate)
d(new ClassNameValidatingLineEditPrivate)
{
}
ClassNameValidatingLineEdit::~ClassNameValidatingLineEdit()
{
delete m_d;
delete d;
}
bool ClassNameValidatingLineEdit::namespacesEnabled() const
{
return m_d->m_namespacesEnabled;
return d->m_namespacesEnabled;
}
void ClassNameValidatingLineEdit::setNamespacesEnabled(bool b)
{
m_d->m_namespacesEnabled = b;
d->m_namespacesEnabled = b;
}
bool ClassNameValidatingLineEdit::validate(const QString &value, QString *errorMessage) const
{
if (!m_d->m_namespacesEnabled && value.contains(QLatin1Char(':'))) {
if (!d->m_namespacesEnabled && value.contains(QLatin1Char(':'))) {
if (errorMessage)
*errorMessage = tr("The class name must not contain namespace delimiters.");
return false;
......@@ -97,7 +97,7 @@ bool ClassNameValidatingLineEdit::validate(const QString &value, QString *errorM
if (errorMessage)
*errorMessage = tr("Please enter a class name.");
return false;
} else if (!m_d->m_nameRegexp.exactMatch(value)) {
} else if (!d->m_nameRegexp.exactMatch(value)) {
if (errorMessage)
*errorMessage = tr("The class name contains invalid characters.");
return false;
......@@ -110,11 +110,11 @@ void ClassNameValidatingLineEdit::slotChanged(const QString &t)
Utils::BaseValidatingLineEdit::slotChanged(t);
if (isValid()) {
// Suggest file names, strip namespaces
QString fileName = m_d->m_lowerCaseFileName ? t.toLower() : t;
if (m_d->m_namespacesEnabled) {
const int namespaceIndex = fileName.lastIndexOf(m_d->m_namespaceDelimiter);
QString fileName = d->m_lowerCaseFileName ? t.toLower() : t;
if (d->m_namespacesEnabled) {
const int namespaceIndex = fileName.lastIndexOf(d->m_namespaceDelimiter);
if (namespaceIndex != -1)
fileName.remove(0, namespaceIndex + m_d->m_namespaceDelimiter.size());
fileName.remove(0, namespaceIndex + d->m_namespaceDelimiter.size());
}
emit updateFileName(fileName);
}
......@@ -148,12 +148,12 @@ QString ClassNameValidatingLineEdit::createClassName(const QString &name)
bool ClassNameValidatingLineEdit::lowerCaseFileName() const
{
return m_d->m_lowerCaseFileName;
return d->m_lowerCaseFileName;
}
void ClassNameValidatingLineEdit::setLowerCaseFileName(bool v)
{
m_d->m_lowerCaseFileName = v;
d->m_lowerCaseFileName = v;
}
} // namespace Utils
......@@ -70,7 +70,7 @@ protected:
virtual void slotChanged(const QString &t);
private:
ClassNameValidatingLineEditPrivate *m_d;
ClassNameValidatingLineEditPrivate *d;
};
} // namespace Utils
......
This diff is collapsed.
......@@ -81,7 +81,7 @@ signals:
void focusIndex(const QModelIndex &index);
private:
Internal::EnvironmentModelPrivate *m_d;
Internal::EnvironmentModelPrivate *d;
};
} // namespace Utils
......
......@@ -59,39 +59,39 @@ FileWizardPagePrivate::FileWizardPagePrivate() :
FileWizardPage::FileWizardPage(QWidget *parent) :
QWizardPage(parent),
m_d(new FileWizardPagePrivate)
d(new FileWizardPagePrivate)
{
m_d->m_ui.setupUi(this);
connect(m_d->m_ui.pathChooser, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
connect(m_d->m_ui.nameLineEdit, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
d->m_ui.setupUi(this);
connect(d->m_ui.pathChooser, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
connect(d->m_ui.nameLineEdit, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
connect(m_d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
connect(m_d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
}
FileWizardPage::~FileWizardPage()
{
delete m_d;
delete d;
}
QString FileWizardPage::fileName() const
{
return m_d->m_ui.nameLineEdit->text();
return d->m_ui.nameLineEdit->text();
}
QString FileWizardPage::path() const
{
return m_d->m_ui.pathChooser->path();
return d->m_ui.pathChooser->path();
}
void FileWizardPage::setPath(const QString &path)
{
m_d->m_ui.pathChooser->setPath(path);
d->m_ui.pathChooser->setPath(path);
}
void FileWizardPage::setFileName(const QString &name)
{
m_d->m_ui.nameLineEdit->setText(name);
d->m_ui.nameLineEdit->setText(name);
}
void FileWizardPage::changeEvent(QEvent *e)
......@@ -99,7 +99,7 @@ void FileWizardPage::changeEvent(QEvent *e)
QWizardPage::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
m_d->m_ui.retranslateUi(this);
d->m_ui.retranslateUi(this);
break;
default:
break;
......@@ -108,31 +108,31 @@ void FileWizardPage::changeEvent(QEvent *e)
bool FileWizardPage::isComplete() const
{
return m_d->m_complete;
return d->m_complete;
}
void FileWizardPage::setFileNameLabel(const QString &label)
{
m_d->m_ui.nameLabel->setText(label);
d->m_ui.nameLabel->setText(label);
}
void FileWizardPage::setPathLabel(const QString &label)
{
m_d->m_ui.pathLabel->setText(label);
d->m_ui.pathLabel->setText(label);
}
void FileWizardPage::slotValidChanged()
{
const bool newComplete = m_d->m_ui.pathChooser->isValid() && m_d->m_ui.nameLineEdit->isValid();
if (newComplete != m_d->m_complete) {
m_d->m_complete = newComplete;
const bool newComplete = d->m_ui.pathChooser->isValid() && d->m_ui.nameLineEdit->isValid();
if (newComplete != d->m_complete) {
d->m_complete = newComplete;
emit completeChanged();
}
}
void FileWizardPage::slotActivated()
{
if (m_d->m_complete)
if (d->m_complete)
emit activated();
}
......
......@@ -78,7 +78,7 @@ protected:
virtual void changeEvent(QEvent *e);
private:
FileWizardPagePrivate *m_d;
FileWizardPagePrivate *d;
};
} // namespace Utils
......
......@@ -61,7 +61,7 @@ IpAddressLineEditPrivate::IpAddressLineEditPrivate()
IpAddressLineEdit::IpAddressLineEdit(QWidget* parent) :
BaseValidatingLineEdit(parent),
m_d(new IpAddressLineEditPrivate())
d(new IpAddressLineEditPrivate())
{
const char * ipAddressRegExpPattern = "^\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\."
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\."
......@@ -70,19 +70,19 @@ IpAddressLineEdit::IpAddressLineEdit(QWidget* parent) :
"((:)(6553[0-5]|655[0-2]\\d|65[0-4]\\d\\d|6[0-4]\\d{3}|[1-5]\\d{4}|[1-9]\\d{0,3}|0))?$";
QRegExp ipAddressRegExp(ipAddressRegExpPattern);
m_d->m_ipAddressValidator = new QRegExpValidator(ipAddressRegExp, this);
d->m_ipAddressValidator = new QRegExpValidator(ipAddressRegExp, this);
}
IpAddressLineEdit::~IpAddressLineEdit()
{
delete m_d;
delete d;
}
bool IpAddressLineEdit::validate(const QString &value, QString *errorMessage) const
{
QString copy = value;
int offset = 0;
bool isValid = m_d->m_ipAddressValidator->validate(copy, offset) == QValidator::Acceptable;
bool isValid = d->m_ipAddressValidator->validate(copy, offset) == QValidator::Acceptable;
if (!isValid) {
*errorMessage = tr("The IP address is not valid.");
return false;
......
......@@ -57,7 +57,7 @@ protected:
virtual void slotChanged(const QString &t);
private:
IpAddressLineEditPrivate *m_d;
IpAddressLineEditPrivate *d;
};
} // namespace Utils
......
This diff is collapsed.
......@@ -160,7 +160,7 @@ private:
void setFormInputCheckable(bool checkable, bool force);
QString fixSuffix(const QString &suffix);
NewClassWidgetPrivate *m_d;
NewClassWidgetPrivate *d;
};
} // namespace Utils
......
This diff is collapsed.
......@@ -144,7 +144,7 @@ private slots:
void slotBrowse();
private:
PathChooserPrivate *m_d;
PathChooserPrivate *d;
};
} // namespace Utils
......
......@@ -133,13 +133,13 @@ PathListEditorPrivate::PathListEditorPrivate() :
PathListEditor::PathListEditor(QWidget *parent) :
QWidget(parent),
m_d(new PathListEditorPrivate)
d(new PathListEditorPrivate)
{
setLayout(m_d->layout);
m_d->toolButton->setPopupMode(QToolButton::MenuButtonPopup);
m_d->toolButton->setText(tr("Insert..."));
m_d->toolButton->setMenu(m_d->buttonMenu);
connect(m_d->toolButton, SIGNAL(clicked()), this, SLOT(slotInsert()));
setLayout(d->layout);
d->toolButton->setPopupMode(QToolButton::MenuButtonPopup);
d->toolButton->setText(tr("Insert..."));
d->toolButton->setMenu(d->buttonMenu);
connect(d->toolButton, SIGNAL(clicked()), this, SLOT(slotInsert()));
addAction(tr("Add..."), this, SLOT(slotAdd()));
addAction(tr("Delete Line"), this, SLOT(deletePathAtCursor()));
......@@ -148,7 +148,7 @@ PathListEditor::PathListEditor(QWidget *parent) :
PathListEditor::~PathListEditor()
{
delete m_d;
delete d;
}
static inline QAction *createAction(QObject *parent, const QString &text, QObject * receiver, const char *slotFunc)
......@@ -161,7 +161,7 @@ static inline QAction *createAction(QObject *parent, const QString &text, QObjec
QAction *PathListEditor::addAction(const QString &text, QObject * receiver, const char *slotFunc)
{
QAction *rc = createAction(this, text, receiver, slotFunc);
m_d->buttonMenu->addAction(rc);
d->buttonMenu->addAction(rc);
return rc;
}
......@@ -170,15 +170,15 @@ QAction *PathListEditor::insertAction(int index /* -1 */, const QString &text, Q
// Find the 'before' action
QAction *beforeAction = 0;
if (index >= 0) {
const QList<QAction*> actions = m_d->buttonMenu->actions();
const QList<QAction*> actions = d->buttonMenu->actions();
if (index < actions.size())
beforeAction = actions.at(index);
}
QAction *rc = createAction(this, text, receiver, slotFunc);
if (beforeAction) {
m_d->buttonMenu->insertAction(beforeAction, rc);
d->buttonMenu->insertAction(beforeAction, rc);
} else {
m_d->buttonMenu->addAction(rc);
d->buttonMenu->addAction(rc);
}
return rc;
}
......@@ -195,7 +195,7 @@ QString PathListEditor::pathListString() const
QStringList PathListEditor::pathList() const
{
const QString text = m_d->edit->toPlainText().trimmed();
const QString text = d->edit->toPlainText().trimmed();
if (text.isEmpty())
return QStringList();
// trim each line
......@@ -208,7 +208,7 @@ QStringList PathListEditor::pathList() const
void PathListEditor::setPathList(const QStringList &l)
{
m_d->edit->setPlainText(l.join(QString(QLatin1Char('\n'))));
d->edit->setPlainText(l.join(QString(QLatin1Char('\n'))));
}
void PathListEditor::setPathList(const QString &pathString)
......@@ -227,29 +227,29 @@ void PathListEditor::setPathListFromEnvVariable(const QString &var)
QString PathListEditor::fileDialogTitle() const
{
return m_d->fileDialogTitle;
return d->fileDialogTitle;
}
void PathListEditor::setFileDialogTitle(const QString &l)
{
m_d->fileDialogTitle = l;
d->fileDialogTitle = l;
}
void PathListEditor::clear()
{
m_d->edit->clear();
d->edit->clear();
}
void PathListEditor::slotAdd()
{
const QString dir = QFileDialog::getExistingDirectory(this, m_d->fileDialogTitle);
const QString dir = QFileDialog::getExistingDirectory(this, d->fileDialogTitle);