summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-09-07 14:26:11 +0200
committerhjk <qthjk@ovi.com>2011-09-08 17:42:14 +0200
commitbfd9fcbb3ccef3c38b02ee60d949c69bab124090 (patch)
treedbc132c725fac2d743c313dac077303a7e74d20c
parent66ab323eb3101b94817b841a906a0222ce7aee1a (diff)
downloadqt-creator-bfd9fcbb3ccef3c38b02ee60d949c69bab124090.tar.gz
all: some m_d -> d style
Change-Id: Iac1f12980bf47666007817cfb2c64a6d1e9b780e Reviewed-on: http://codereview.qt-project.org/4477 Reviewed-by: hjk <qthjk@ovi.com>
-rw-r--r--src/libs/qmljs/qmljsicons.cpp30
-rw-r--r--src/libs/qmljs/qmljsicons.h2
-rw-r--r--src/libs/utils/checkablemessagebox.cpp58
-rw-r--r--src/libs/utils/checkablemessagebox.h2
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.cpp24
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.h2
-rw-r--r--src/libs/utils/environmentmodel.cpp108
-rw-r--r--src/libs/utils/environmentmodel.h2
-rw-r--r--src/libs/utils/filewizardpage.cpp38
-rw-r--r--src/libs/utils/filewizardpage.h2
-rw-r--r--src/libs/utils/ipaddresslineedit.cpp8
-rw-r--r--src/libs/utils/ipaddresslineedit.h2
-rw-r--r--src/libs/utils/newclasswidget.cpp208
-rw-r--r--src/libs/utils/newclasswidget.h2
-rw-r--r--src/libs/utils/pathchooser.cpp112
-rw-r--r--src/libs/utils/pathchooser.h2
-rw-r--r--src/libs/utils/pathlisteditor.cpp58
-rw-r--r--src/libs/utils/pathlisteditor.h6
-rw-r--r--src/libs/utils/projectintropage.cpp68
-rw-r--r--src/libs/utils/projectintropage.h2
-rw-r--r--src/libs/utils/submiteditorwidget.cpp208
-rw-r--r--src/libs/utils/submiteditorwidget.h2
-rw-r--r--src/libs/utils/submitfieldwidget.cpp90
-rw-r--r--src/libs/utils/submitfieldwidget.h4
-rw-r--r--src/libs/utils/synchronousprocess.cpp162
-rw-r--r--src/libs/utils/synchronousprocess.h3
-rw-r--r--src/plugins/coreplugin/vcsmanager.cpp12
-rw-r--r--src/plugins/coreplugin/vcsmanager.h7
-rw-r--r--src/plugins/cpptools/cpptoolssettings.cpp34
-rw-r--r--src/plugins/cpptools/cpptoolssettings.h2
-rw-r--r--src/plugins/projectexplorer/toolchain.cpp30
-rw-r--r--src/plugins/projectexplorer/toolchain.h2
-rw-r--r--src/plugins/vcsbase/baseannotationhighlighter.cpp14
-rw-r--r--src/plugins/vcsbase/baseannotationhighlighter.h2
-rw-r--r--src/plugins/vcsbase/vcsconfigurationpage.cpp16
-rw-r--r--src/plugins/vcsbase/vcsconfigurationpage.h2
36 files changed, 659 insertions, 667 deletions
diff --git a/src/libs/qmljs/qmljsicons.cpp b/src/libs/qmljs/qmljsicons.cpp
index 0f8ab68808..2a9010bb5c 100644
--- a/src/libs/qmljs/qmljsicons.cpp
+++ b/src/libs/qmljs/qmljsicons.cpp
@@ -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;
}
diff --git a/src/libs/qmljs/qmljsicons.h b/src/libs/qmljs/qmljsicons.h
index 27d965f9ad..b2044e249f 100644
--- a/src/libs/qmljs/qmljsicons.h
+++ b/src/libs/qmljs/qmljsicons.h
@@ -61,7 +61,7 @@ public:
private:
Icons();
static Icons *m_instance;
- IconsPrivate *m_d;
+ IconsPrivate *d;
};
} // namespace QmlJS
diff --git a/src/libs/utils/checkablemessagebox.cpp b/src/libs/utils/checkablemessagebox.cpp
index 0ba59c9907..6793f4e7de 100644
--- a/src/libs/utils/checkablemessagebox.cpp
+++ b/src/libs/utils/checkablemessagebox.cpp
@@ -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();
}
diff --git a/src/libs/utils/checkablemessagebox.h b/src/libs/utils/checkablemessagebox.h
index 33af0c8363..483c59b319 100644
--- a/src/libs/utils/checkablemessagebox.h
+++ b/src/libs/utils/checkablemessagebox.h
@@ -100,7 +100,7 @@ private slots:
void slotClicked(QAbstractButton *b);
private:
- CheckableMessageBoxPrivate *m_d;
+ CheckableMessageBoxPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/classnamevalidatinglineedit.cpp b/src/libs/utils/classnamevalidatinglineedit.cpp
index 5d89eed4a2..4afd91411a 100644
--- a/src/libs/utils/classnamevalidatinglineedit.cpp
+++ b/src/libs/utils/classnamevalidatinglineedit.cpp
@@ -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
diff --git a/src/libs/utils/classnamevalidatinglineedit.h b/src/libs/utils/classnamevalidatinglineedit.h
index 032331b7e9..d975d4825a 100644
--- a/src/libs/utils/classnamevalidatinglineedit.h
+++ b/src/libs/utils/classnamevalidatinglineedit.h
@@ -70,7 +70,7 @@ protected:
virtual void slotChanged(const QString &t);
private:
- ClassNameValidatingLineEditPrivate *m_d;
+ ClassNameValidatingLineEditPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/environmentmodel.cpp b/src/libs/utils/environmentmodel.cpp
index 8e2be94b3f..0427d0381a 100644
--- a/src/libs/utils/environmentmodel.cpp
+++ b/src/libs/utils/environmentmodel.cpp
@@ -93,26 +93,26 @@ public:
EnvironmentModel::EnvironmentModel(QObject *parent) :
QAbstractTableModel(parent),
- m_d(new Internal::EnvironmentModelPrivate)
+ d(new Internal::EnvironmentModelPrivate)
{ }
EnvironmentModel::~EnvironmentModel()
{
- delete m_d;
+ delete d;
}
QString EnvironmentModel::indexToVariable(const QModelIndex &index) const
{
- return m_d->m_resultEnvironment.key(m_d->m_resultEnvironment.constBegin() + index.row());
+ return d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row());
}
void EnvironmentModel::setBaseEnvironment(const Utils::Environment &env)
{
- if (m_d->m_baseEnvironment == env)
+ if (d->m_baseEnvironment == env)
return;
beginResetModel();
- m_d->m_baseEnvironment = env;
- m_d->updateResultEnvironment();
+ d->m_baseEnvironment = env;
+ d->updateResultEnvironment();
endResetModel();
}
@@ -121,7 +121,7 @@ int EnvironmentModel::rowCount(const QModelIndex &parent) const
if (parent.isValid())
return 0;
- return m_d->m_resultEnvironment.size();
+ return d->m_resultEnvironment.size();
}
int EnvironmentModel::columnCount(const QModelIndex &parent) const
{
@@ -133,7 +133,7 @@ int EnvironmentModel::columnCount(const QModelIndex &parent) const
bool EnvironmentModel::changes(const QString &name) const
{
- return m_d->findInChanges(name) >= 0;
+ return d->findInChanges(name) >= 0;
}
QVariant EnvironmentModel::data(const QModelIndex &index, int role) const
@@ -143,20 +143,20 @@ QVariant EnvironmentModel::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole || role == Qt::EditRole || role == Qt::ToolTipRole) {
if (index.column() == 0) {
- return m_d->m_resultEnvironment.key(m_d->m_resultEnvironment.constBegin() + index.row());
+ return d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row());
} else if (index.column() == 1) {
// Do not return "<UNSET>" when editing a previously unset variable:
if (role == Qt::EditRole) {
- int pos = m_d->findInChanges(indexToVariable(index));
+ int pos = d->findInChanges(indexToVariable(index));
if (pos >= 0)
- return m_d->m_items.at(pos).value;
+ return d->m_items.at(pos).value;
}
- return m_d->m_resultEnvironment.value(m_d->m_resultEnvironment.constBegin() + index.row());
+ return d->m_resultEnvironment.value(d->m_resultEnvironment.constBegin() + index.row());
}
}
if (role == Qt::FontRole) {
// check whether this environment variable exists in m_d->m_items
- if (changes(m_d->m_resultEnvironment.key(m_d->m_resultEnvironment.constBegin() + index.row()))) {
+ if (changes(d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row()))) {
QFont f;
f.setBold(true);
return QVariant(f);
@@ -184,7 +184,7 @@ QVariant EnvironmentModel::headerData(int section, Qt::Orientation orientation,
/// *****************
QModelIndex EnvironmentModel::variableToIndex(const QString &name) const
{
- int row = m_d->findInResult(name);
+ int row = d->findInResult(name);
if (row == -1)
return QModelIndex();
return index(row, 0);
@@ -201,7 +201,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
const QString oldName = data(this->index(index.row(), 0, QModelIndex())).toString();
const QString oldValue = data(this->index(index.row(), 1, QModelIndex())).toString();
- int changesPos = m_d->findInChanges(oldName);
+ int changesPos = d->findInChanges(oldName);
if (index.column() == 0) {
//fail if a variable with the same name already exists
@@ -211,7 +211,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
const QString &newName = value.toString();
#endif
// Does the new name exist already?
- if (m_d->m_resultEnvironment.hasKey(newName))
+ if (d->m_resultEnvironment.hasKey(newName))
return false;
Utils::EnvironmentItem newVariable(newName, oldValue);
@@ -227,19 +227,19 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
const QString stringValue = value.toString();
if (changesPos != -1) {
// We have already changed this value
- if (stringValue == m_d->m_baseEnvironment.value(oldName)) {
+ if (stringValue == d->m_baseEnvironment.value(oldName)) {
// ... and now went back to the base value
- m_d->m_items.removeAt(changesPos);
+ d->m_items.removeAt(changesPos);
} else {
// ... and changed it again
- m_d->m_items[changesPos].value = stringValue;
- m_d->m_items[changesPos].unset = false;
+ d->m_items[changesPos].value = stringValue;
+ d->m_items[changesPos].unset = false;
}
} else {
// Add a new change item:
- m_d->m_items.append(Utils::EnvironmentItem(oldName, stringValue));
+ d->m_items.append(Utils::EnvironmentItem(oldName, stringValue));
}
- m_d->updateResultEnvironment();
+ d->updateResultEnvironment();
emit dataChanged(index, index);
emit userChangesChanged();
return true;
@@ -259,28 +259,28 @@ QModelIndex EnvironmentModel::addVariable(const Utils::EnvironmentItem &item)
{
// Return existing index if the name is already in the result set:
- int pos = m_d->findInResult(item.name);
- if (pos >= 0 && pos < m_d->m_resultEnvironment.size())
+ int pos = d->findInResult(item.name);
+ if (pos >= 0 && pos < d->m_resultEnvironment.size())
return index(pos, 0, QModelIndex());
- int insertPos = m_d->findInResultInsertPosition(item.name);
- int changePos = m_d->findInChanges(item.name);
- if (m_d->m_baseEnvironment.hasKey(item.name)) {
+ int insertPos = d->findInResultInsertPosition(item.name);
+ int changePos = d->findInChanges(item.name);
+ if (d->m_baseEnvironment.hasKey(item.name)) {
// We previously unset this!
Q_ASSERT(changePos >= 0);
// Do not insert a line here as we listed the variable as <UNSET> before!
- Q_ASSERT(m_d->m_items.at(changePos).name == item.name);
- Q_ASSERT(m_d->m_items.at(changePos).unset);
- Q_ASSERT(m_d->m_items.at(changePos).value.isEmpty());
- m_d->m_items[changePos] = item;
+ Q_ASSERT(d->m_items.at(changePos).name == item.name);
+ Q_ASSERT(d->m_items.at(changePos).unset);
+ Q_ASSERT(d->m_items.at(changePos).value.isEmpty());
+ d->m_items[changePos] = item;
emit dataChanged(index(insertPos, 0, QModelIndex()), index(insertPos, 1, QModelIndex()));
} else {
// We add something that is not in the base environment
// Insert a new line!
beginInsertRows(QModelIndex(), insertPos, insertPos);
Q_ASSERT(changePos < 0);
- m_d->m_items.append(item);
- m_d->updateResultEnvironment();
+ d->m_items.append(item);
+ d->updateResultEnvironment();
endInsertRows();
}
emit userChangesChanged();
@@ -289,24 +289,24 @@ QModelIndex EnvironmentModel::addVariable(const Utils::EnvironmentItem &item)
void EnvironmentModel::resetVariable(const QString &name)
{
- int rowInChanges = m_d->findInChanges(name);
+ int rowInChanges = d->findInChanges(name);
if (rowInChanges < 0)
return;
- int rowInResult = m_d->findInResult(name);
+ int rowInResult = d->findInResult(name);
if (rowInResult < 0)
return;
- if (m_d->m_baseEnvironment.hasKey(name)) {
- m_d->m_items.removeAt(rowInChanges);
- m_d->updateResultEnvironment();
+ if (d->m_baseEnvironment.hasKey(name)) {
+ d->m_items.removeAt(rowInChanges);
+ d->updateResultEnvironment();
emit dataChanged(index(rowInResult, 0, QModelIndex()), index(rowInResult, 1, QModelIndex()));
emit userChangesChanged();
} else {
// Remove the line completely!
beginRemoveRows(QModelIndex(), rowInResult, rowInResult);
- m_d->m_items.removeAt(rowInChanges);
- m_d->updateResultEnvironment();
+ d->m_items.removeAt(rowInChanges);
+ d->updateResultEnvironment();
endRemoveRows();
emit userChangesChanged();
}
@@ -316,55 +316,55 @@ void EnvironmentModel::unsetVariable(const QString &name)
{
// This does not change the number of rows as we will display a <UNSET>
// in place of the original variable!
- int row = m_d->findInResult(name);
+ int row = d->findInResult(name);
if (row < 0)
return;
// look in m_d->m_items for the variable
- int pos = m_d->findInChanges(name);
+ int pos = d->findInChanges(name);
if (pos != -1) {
- m_d->m_items[pos].unset = true;
- m_d->m_items[pos].value.clear();
- m_d->updateResultEnvironment();
+ d->m_items[pos].unset = true;
+ d->m_items[pos].value.clear();
+ d->updateResultEnvironment();
emit dataChanged(index(row, 0, QModelIndex()), index(row, 1, QModelIndex()));
emit userChangesChanged();
return;
}
Utils::EnvironmentItem item(name, QString());
item.unset = true;
- m_d->m_items.append(item);
- m_d->updateResultEnvironment();
+ d->m_items.append(item);
+ d->updateResultEnvironment();
emit dataChanged(index(row, 0, QModelIndex()), index(row, 1, QModelIndex()));
emit userChangesChanged();
}
bool EnvironmentModel::canUnset(const QString &name)
{
- int pos = m_d->findInChanges(name);
+ int pos = d->findInChanges(name);
if (pos != -1)
- return m_d->m_items.at(pos).unset;
+ return d->m_items.at(pos).unset;
else
return false;
}
bool EnvironmentModel::canReset(const QString &name)
{
- return m_d->m_baseEnvironment.hasKey(name);
+ return d->m_baseEnvironment.hasKey(name);
}
QList<Utils::EnvironmentItem> EnvironmentModel::userChanges() const
{
- return m_d->m_items;
+ return d->m_items;
}
void EnvironmentModel::setUserChanges(QList<Utils::EnvironmentItem> list)
{
// We assume nobody is reordering the items here.
- if (list == m_d->m_items)
+ if (list == d->m_items)
return;
beginResetModel();
- m_d->m_items = list;
- m_d->updateResultEnvironment();
+ d->m_items = list;
+ d->updateResultEnvironment();
endResetModel();
}
diff --git a/src/libs/utils/environmentmodel.h b/src/libs/utils/environmentmodel.h
index c8864ac17b..f12bd06da5 100644
--- a/src/libs/utils/environmentmodel.h
+++ b/src/libs/utils/environmentmodel.h
@@ -81,7 +81,7 @@ signals:
void focusIndex(const QModelIndex &index);
private:
- Internal::EnvironmentModelPrivate *m_d;
+ Internal::EnvironmentModelPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp
index f92c13059b..d3f4db5f50 100644
--- a/src/libs/utils/filewizardpage.cpp
+++ b/src/libs/utils/filewizardpage.cpp
@@ -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();
}
diff --git a/src/libs/utils/filewizardpage.h b/src/libs/utils/filewizardpage.h
index 4fb04bced3..94a5f37fa4 100644
--- a/src/libs/utils/filewizardpage.h
+++ b/src/libs/utils/filewizardpage.h
@@ -78,7 +78,7 @@ protected:
virtual void changeEvent(QEvent *e);
private:
- FileWizardPagePrivate *m_d;
+ FileWizardPagePrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/ipaddresslineedit.cpp b/src/libs/utils/ipaddresslineedit.cpp
index e750e95282..0c63cb4abd 100644
--- a/src/libs/utils/ipaddresslineedit.cpp
+++ b/src/libs/utils/ipaddresslineedit.cpp
@@ -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;
diff --git a/src/libs/utils/ipaddresslineedit.h b/src/libs/utils/ipaddresslineedit.h
index a34e5d9946..37b44b04d8 100644
--- a/src/libs/utils/ipaddresslineedit.h
+++ b/src/libs/utils/ipaddresslineedit.h
@@ -57,7 +57,7 @@ protected:
virtual void slotChanged(const QString &t);
private:
- IpAddressLineEditPrivate *m_d;
+ IpAddressLineEditPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/newclasswidget.cpp b/src/libs/utils/newclasswidget.cpp
index 3f8e82dcc2..205a8ae2e7 100644
--- a/src/libs/utils/newclasswidget.cpp
+++ b/src/libs/utils/newclasswidget.cpp
@@ -91,72 +91,72 @@ NewClassWidgetPrivate:: NewClassWidgetPrivate() :
// --------------------- NewClassWidget
NewClassWidget::NewClassWidget(QWidget *parent) :
QWidget(parent),
- m_d(new NewClassWidgetPrivate)
+ d(new NewClassWidgetPrivate)
{
- m_d->m_ui.setupUi(this);
+ d->m_ui.setupUi(this);
- m_d->m_ui.baseClassComboBox->setEditable(false);
+ d->m_ui.baseClassComboBox->setEditable(false);
- connect(m_d->m_ui.classLineEdit, SIGNAL(updateFileName(QString)),
+ connect(d->m_ui.classLineEdit, SIGNAL(updateFileName(QString)),
this, SLOT(slotUpdateFileNames(QString)));
- connect(m_d->m_ui.classLineEdit, SIGNAL(textEdited(QString)),
+ connect(d->m_ui.classLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(classNameEdited()));
- connect(m_d->m_ui.baseClassComboBox, SIGNAL(currentIndexChanged(int)),
+ connect(d->m_ui.baseClassComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(suggestClassNameFromBase()));
- connect(m_d->m_ui.baseClassComboBox, SIGNAL(editTextChanged(QString)),
+ connect(d->m_ui.baseClassComboBox, SIGNAL(editTextChanged(QString)),
this, SLOT(slotValidChanged()));
- connect(m_d->m_ui.classLineEdit, SIGNAL(validChanged()),
+ connect(d->m_ui.classLineEdit, SIGNAL(validChanged()),
this, SLOT(slotValidChanged()));
- connect(m_d->m_ui.headerFileLineEdit, SIGNAL(validChanged()),
+ connect(d->m_ui.headerFileLineEdit, SIGNAL(validChanged()),
this, SLOT(slotValidChanged()));
- connect(m_d->m_ui.sourceFileLineEdit, SIGNAL(validChanged()),
+ connect(d->m_ui.sourceFileLineEdit, SIGNAL(validChanged()),
this, SLOT(slotValidChanged()));
- connect(m_d->m_ui.formFileLineEdit, SIGNAL(validChanged()),
+ connect(d->m_ui.formFileLineEdit, SIGNAL(validChanged()),
this, SLOT(slotValidChanged()));
- connect(m_d->m_ui.pathChooser, SIGNAL(validChanged()),
+ connect(d->m_ui.pathChooser, SIGNAL(validChanged()),
this, SLOT(slotValidChanged()));
- connect(m_d->m_ui.generateFormCheckBox, SIGNAL(toggled(bool)),
+ connect(d->m_ui.generateFormCheckBox, SIGNAL(toggled(bool)),
this, SLOT(slotValidChanged()));
- connect(m_d->m_ui.classLineEdit, SIGNAL(validReturnPressed()),
+ connect(d->m_ui.classLineEdit, SIGNAL(validReturnPressed()),
this, SLOT(slotActivated()));
- connect(m_d->m_ui.headerFileLineEdit, SIGNAL(validReturnPressed()),
+ connect(d->m_ui.headerFileLineEdit, SIGNAL(validReturnPressed()),
this, SLOT(slotActivated()));
- connect(m_d->m_ui.sourceFileLineEdit, SIGNAL(validReturnPressed()),
+ connect(d->m_ui.sourceFileLineEdit, SIGNAL(validReturnPressed()),
this, SLOT(slotActivated()));
- connect(m_d->m_ui.formFileLineEdit, SIGNAL(validReturnPressed()),
+ connect(d->m_ui.formFileLineEdit, SIGNAL(validReturnPressed()),
this, SLOT(slotActivated()));
- connect(m_d->m_ui.formFileLineEdit, SIGNAL(validReturnPressed()),
+ connect(d->m_ui.formFileLineEdit, SIGNAL(validReturnPressed()),
this, SLOT(slotActivated()));
- connect(m_d->m_ui.pathChooser, SIGNAL(returnPressed()),
+ connect(d->m_ui.pathChooser, SIGNAL(returnPressed()),
this, SLOT(slotActivated()));
- connect(m_d->m_ui.generateFormCheckBox, SIGNAL(stateChanged(int)),
+ connect(d->m_ui.generateFormCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(slotFormInputChecked()));
- connect(m_d->m_ui.baseClassComboBox, SIGNAL(editTextChanged(QString)),
+ connect(d->m_ui.baseClassComboBox, SIGNAL(editTextChanged(QString)),
this, SLOT(slotBaseClassEdited(QString)));
- m_d->m_ui.generateFormCheckBox->setChecked(true);
+ d->m_ui.generateFormCheckBox->setChecked(true);
setFormInputCheckable(false, true);
setClassType(NoClassType);
}
NewClassWidget::~NewClassWidget()
{
- delete m_d;
+ delete d;
}
void NewClassWidget::classNameEdited()
{
if (debugNewClassWidget)
- qDebug() << Q_FUNC_INFO << m_d->m_headerExtension << m_d->m_sourceExtension;
- m_d->m_classEdited = true;
+ qDebug() << Q_FUNC_INFO << d->m_headerExtension << d->m_sourceExtension;
+ d->m_classEdited = true;
}
void NewClassWidget::suggestClassNameFromBase()
{
if (debugNewClassWidget)
- qDebug() << Q_FUNC_INFO << m_d->m_headerExtension << m_d->m_sourceExtension;
- if (m_d->m_classEdited)
+ qDebug() << Q_FUNC_INFO << d->m_headerExtension << d->m_sourceExtension;
+ if (d->m_classEdited)
return;
// Suggest a class unless edited ("QMainWindow"->"MainWindow")
QString base = baseClassName();
@@ -169,50 +169,50 @@ void NewClassWidget::suggestClassNameFromBase()
QStringList NewClassWidget::baseClassChoices() const
{
QStringList rc;
- const int count = m_d->m_ui.baseClassComboBox->count();
+ const int count = d->m_ui.baseClassComboBox->count();
for (int i = 0; i < count; i++)
- rc.push_back(m_d->m_ui.baseClassComboBox->itemText(i));
+ rc.push_back(d->m_ui.baseClassComboBox->itemText(i));
return rc;
}
void NewClassWidget::setBaseClassChoices(const QStringList &choices)
{
- m_d->m_ui.baseClassComboBox->clear();
- m_d->m_ui.baseClassComboBox->addItems(choices);
+ d->m_ui.baseClassComboBox->clear();
+ d->m_ui.baseClassComboBox->addItems(choices);
}
void NewClassWidget::setBaseClassInputVisible(bool visible)
{
- m_d->m_baseClassInputVisible = visible;
- m_d->m_ui.baseClassLabel->setVisible(visible);
- m_d->m_ui.baseClassComboBox->setVisible(visible);
+ d->m_baseClassInputVisible = visible;
+ d->m_ui.baseClassLabel->setVisible(visible);
+ d->m_ui.baseClassComboBox->setVisible(visible);
}
void NewClassWidget::setBaseClassEditable(bool editable)
{
- m_d->m_ui.baseClassComboBox->setEditable(editable);
+ d->m_ui.baseClassComboBox->setEditable(editable);
}
bool NewClassWidget::isBaseClassInputVisible() const
{
- return m_d->m_baseClassInputVisible;
+ return d->m_baseClassInputVisible;
}
bool NewClassWidget::isBaseClassEditable() const
{
- return m_d->m_ui.baseClassComboBox->isEditable();
+ return d->m_ui.baseClassComboBox->isEditable();
}
void NewClassWidget::setFormInputVisible(bool visible)
{
- m_d->m_formInputVisible = visible;
- m_d->m_ui.formLabel->setVisible(visible);
- m_d->m_ui.formFileLineEdit->setVisible(visible);
+ d->m_formInputVisible = visible;
+ d->m_ui.formLabel->setVisible(visible);
+ d->m_ui.formFileLineEdit->setVisible(visible);
}
bool NewClassWidget::isFormInputVisible() const
{
- return m_d->m_formInputVisible;
+ return d->m_formInputVisible;
}
void NewClassWidget::setFormInputCheckable(bool checkable)
@@ -222,188 +222,188 @@ void NewClassWidget::setFormInputCheckable(bool checkable)
void NewClassWidget::setFormInputCheckable(bool checkable, bool force)
{
- if (!force && checkable == m_d->m_formInputCheckable)
+ if (!force && checkable == d->m_formInputCheckable)
return;
- m_d->m_formInputCheckable = checkable;
- m_d->m_ui.generateFormLabel->setVisible(checkable);
- m_d->m_ui.generateFormCheckBox->setVisible(checkable);
+ d->m_formInputCheckable = checkable;
+ d->m_ui.generateFormLabel->setVisible(checkable);
+ d->m_ui.generateFormCheckBox->setVisible(checkable);
}
void NewClassWidget::setFormInputChecked(bool v)
{
- m_d->m_ui.generateFormCheckBox->setChecked(v);
+ d->m_ui.generateFormCheckBox->setChecked(v);
}
bool NewClassWidget::formInputCheckable() const
{
- return m_d->m_formInputCheckable;
+ return d->m_formInputCheckable;
}
bool NewClassWidget::formInputChecked() const
{
- return m_d->m_ui.generateFormCheckBox->isChecked();
+ return d->m_ui.generateFormCheckBox->isChecked();
}
void NewClassWidget::slotFormInputChecked()
{
const bool checked = formInputChecked();
- m_d->m_ui.formLabel->setEnabled(checked);
- m_d->m_ui.formFileLineEdit->setEnabled(checked);
+ d->m_ui.formLabel->setEnabled(checked);
+ d->m_ui.formFileLineEdit->setEnabled(checked);
}
void NewClassWidget::setPathInputVisible(bool visible)
{
- m_d->m_pathInputVisible = visible;
- m_d->m_ui.pathLabel->setVisible(visible);
- m_d->m_ui.pathChooser->setVisible(visible);
+ d->m_pathInputVisible = visible;
+ d->m_ui.pathLabel->setVisible(visible);
+ d->m_ui.pathChooser->setVisible(visible);
}
bool NewClassWidget::isPathInputVisible() const
{
- return m_d->m_pathInputVisible;
+ return d->m_pathInputVisible;
}
void NewClassWidget::setClassName(const QString &suggestedName)
{
if (debugNewClassWidget)
- qDebug() << Q_FUNC_INFO << suggestedName << m_d->m_headerExtension << m_d->m_sourceExtension;
- m_d->m_ui.classLineEdit->setText(ClassNameValidatingLineEdit::createClassName(suggestedName));
+ qDebug() << Q_FUNC_INFO << suggestedName << d->m_headerExtension << d->m_sourceExtension;
+ d->m_ui.classLineEdit->setText(ClassNameValidatingLineEdit::createClassName(suggestedName));
}
QString NewClassWidget::className() const
{
- return m_d->m_ui.classLineEdit->text();
+ return d->m_ui.classLineEdit->text();
}
QString NewClassWidget::baseClassName() const
{
- return m_d->m_ui.baseClassComboBox->currentText();
+ return d->m_ui.baseClassComboBox->currentText();
}
void NewClassWidget::setBaseClassName(const QString &c)
{
- const int index = m_d->m_ui.baseClassComboBox->findText(c);
+ const int index = d->m_ui.baseClassComboBox->findText(c);
if (index != -1) {
- m_d->m_ui.baseClassComboBox->setCurrentIndex(index);
+ d->m_ui.baseClassComboBox->setCurrentIndex(index);
suggestClassNameFromBase();
}
}
QString NewClassWidget::sourceFileName() const
{
- return m_d->m_ui.sourceFileLineEdit->text();
+ return d->m_ui.sourceFileLineEdit->text();
}
QString NewClassWidget::headerFileName() const
{
- return m_d->m_ui.headerFileLineEdit->text();
+ return d->m_ui.headerFileLineEdit->text();
}
QString NewClassWidget::formFileName() const
{
- return m_d->m_ui.formFileLineEdit->text();
+ return d->m_ui.formFileLineEdit->text();
}
QString NewClassWidget::path() const
{
- return m_d->m_ui.pathChooser->path();
+ return d->m_ui.pathChooser->path();
}
void NewClassWidget::setPath(const QString &path)
{
- m_d->m_ui.pathChooser->setPath(path);
+ d->m_ui.pathChooser->setPath(path);
}
bool NewClassWidget::namespacesEnabled() const
{
- return m_d->m_ui.classLineEdit->namespacesEnabled();
+ return d->m_ui.classLineEdit->namespacesEnabled();
}
void NewClassWidget::setNamespacesEnabled(bool b)
{
- m_d->m_ui.classLineEdit->setNamespacesEnabled(b);
+ d->m_ui.classLineEdit->setNamespacesEnabled(b);
}
QString NewClassWidget::sourceExtension() const
{
- return m_d->m_sourceExtension;
+ return d->m_sourceExtension;
}
void NewClassWidget::setSourceExtension(const QString &e)
{
if (debugNewClassWidget)
qDebug() << Q_FUNC_INFO << e;
- m_d->m_sourceExtension = fixSuffix(e);
+ d->m_sourceExtension = fixSuffix(e);
}
QString NewClassWidget::headerExtension() const
{
- return m_d->m_headerExtension;
+ return d->m_headerExtension;
}
void NewClassWidget::setHeaderExtension(const QString &e)
{
if (debugNewClassWidget)
qDebug() << Q_FUNC_INFO << e;
- m_d->m_headerExtension = fixSuffix(e);
+ d->m_headerExtension = fixSuffix(e);
}
QString NewClassWidget::formExtension() const
{
- return m_d->m_formExtension;
+ return d->m_formExtension;
}
void NewClassWidget::setFormExtension(const QString &e)
{
if (debugNewClassWidget)
qDebug() << Q_FUNC_INFO << e;
- m_d->m_formExtension = fixSuffix(e);
+ d->m_formExtension = fixSuffix(e);
}
bool NewClassWidget::allowDirectories() const
{
- return m_d->m_ui.headerFileLineEdit->allowDirectories();
+ return d->m_ui.headerFileLineEdit->allowDirectories();
}
void NewClassWidget::setAllowDirectories(bool v)
{
// We keep all in sync
if (allowDirectories() != v) {
- m_d->m_ui.sourceFileLineEdit->setAllowDirectories(v);
- m_d->m_ui.headerFileLineEdit->setAllowDirectories(v);
- m_d->m_ui.formFileLineEdit->setAllowDirectories(v);
+ d->m_ui.sourceFileLineEdit->setAllowDirectories(v);
+ d->m_ui.headerFileLineEdit->setAllowDirectories(v);
+ d->m_ui.formFileLineEdit->setAllowDirectories(v);
}
}
bool NewClassWidget::lowerCaseFiles() const
{
- return m_d->m_ui.classLineEdit->lowerCaseFileName();
+ return d->m_ui.classLineEdit->lowerCaseFileName();
}
void NewClassWidget::setLowerCaseFiles(bool v)
{
- m_d->m_ui.classLineEdit->setLowerCaseFileName(v);
+ d->m_ui.classLineEdit->setLowerCaseFileName(v);
}
NewClassWidget::ClassType NewClassWidget::classType() const
{
- return static_cast<ClassType>(m_d->m_ui.classTypeComboBox->currentIndex());
+ return static_cast<ClassType>(d->m_ui.classTypeComboBox->currentIndex());
}
void NewClassWidget::setClassType(ClassType ct)
{
- m_d->m_ui.classTypeComboBox->setCurrentIndex(ct);
+ d->m_ui.classTypeComboBox->setCurrentIndex(ct);
}
bool NewClassWidget::isClassTypeComboVisible() const
{
- return m_d->m_ui.classTypeLabel->isVisible();
+ return d->m_ui.classTypeLabel->isVisible();
}
void NewClassWidget::setClassTypeComboVisible(bool v)
{
- m_d->m_ui.classTypeLabel->setVisible(v);
- m_d->m_ui.classTypeComboBox->setVisible(v);
+ d->m_ui.classTypeLabel->setVisible(v);
+ d->m_ui.classTypeComboBox->setVisible(v);
}
// Guess suitable type information with some smartness
@@ -437,24 +437,24 @@ void NewClassWidget::slotBaseClassEdited(const QString &baseClass)
void NewClassWidget::slotValidChanged()
{
const bool newValid = isValid();
- if (newValid != m_d->m_valid) {
- m_d->m_valid = newValid;
+ if (newValid != d->m_valid) {
+ d->m_valid = newValid;
emit validChanged();
}
}
bool NewClassWidget::isValid(QString *error) const
{
- if (!m_d->m_ui.classLineEdit->isValid()) {
+ if (!d->m_ui.classLineEdit->isValid()) {
if (error)
- *error = m_d->m_ui.classLineEdit->errorMessage();
+ *error = d->m_ui.classLineEdit->errorMessage();
return false;
}
if (isBaseClassInputVisible() && isBaseClassEditable()) {
// TODO: Should this be a ClassNameValidatingComboBox?
QRegExp classNameValidator(QLatin1String("[a-zA-Z_][a-zA-Z0-9_]*(::[a-zA-Z_][a-zA-Z0-9_]*)*"));
- const QString baseClass = m_d->m_ui.baseClassComboBox->currentText().trimmed();
+ const QString baseClass = d->m_ui.baseClassComboBox->currentText().trimmed();
if (!baseClass.isEmpty() && !classNameValidator.exactMatch(baseClass)) {
if (error)
*error = tr("Invalid base class name");
@@ -462,31 +462,31 @@ bool NewClassWidget::isValid(QString *error) const
}
}
- if (!m_d->m_ui.headerFileLineEdit->isValid()) {
+ if (!d->m_ui.headerFileLineEdit->isValid()) {
if (error)
- *error = tr("Invalid header file name: '%1'").arg(m_d->m_ui.headerFileLineEdit->errorMessage());
+ *error = tr("Invalid header file name: '%1'").arg(d->m_ui.headerFileLineEdit->errorMessage());
return false;
}
- if (!m_d->m_ui.sourceFileLineEdit->isValid()) {
+ if (!d->m_ui.sourceFileLineEdit->isValid()) {
if (error)
- *error = tr("Invalid source file name: '%1'").arg(m_d->m_ui.sourceFileLineEdit->errorMessage());
+ *error = tr("Invalid source file name: '%1'").arg(d->m_ui.sourceFileLineEdit->errorMessage());
return false;
}
if (isFormInputVisible() &&
- (!m_d->m_formInputCheckable || m_d->m_ui.generateFormCheckBox->isChecked())) {
- if (!m_d->m_ui.formFileLineEdit->isValid()) {
+ (!d->m_formInputCheckable || d->m_ui.generateFormCheckBox->isChecked())) {
+ if (!d->m_ui.formFileLineEdit->isValid()) {
if (error)
- *error = tr("Invalid form file name: '%1'").arg(m_d->m_ui.formFileLineEdit->errorMessage());
+ *error = tr("Invalid form file name: '%1'").arg(d->m_ui.formFileLineEdit->errorMessage());
return false;
}
}
if (isPathInputVisible()) {
- if (!m_d->m_ui.pathChooser->isValid()) {
+ if (!d->m_ui.pathChooser->isValid()) {
if (error)
- *error = m_d->m_ui.pathChooser->errorMessage();
+ *error = d->m_ui.pathChooser->errorMessage();
return false;
}
}
@@ -495,22 +495,22 @@ bool NewClassWidget::isValid(QString *error) const
void NewClassWidget::triggerUpdateFileNames()
{
- m_d->m_ui.classLineEdit->triggerChanged();
+ d->m_ui.classLineEdit->triggerChanged();
}
void NewClassWidget::slotUpdateFileNames(const QString &baseName)
{
if (debugNewClassWidget)
- qDebug() << Q_FUNC_INFO << baseName << m_d->m_headerExtension << m_d->m_sourceExtension;
+ qDebug() << Q_FUNC_INFO << baseName << d->m_headerExtension << d->m_sourceExtension;
const QChar dot = QLatin1Char('.');
- m_d->m_ui.sourceFileLineEdit->setText(baseName + dot + m_d->m_sourceExtension);
- m_d->m_ui.headerFileLineEdit->setText(baseName + dot + m_d->m_headerExtension);
- m_d->m_ui.formFileLineEdit->setText(baseName + dot + m_d->m_formExtension);
+ d->m_ui.sourceFileLineEdit->setText(baseName + dot + d->m_sourceExtension);
+ d->m_ui.headerFileLineEdit->setText(baseName + dot + d->m_headerExtension);
+ d->m_ui.formFileLineEdit->setText(baseName + dot + d->m_formExtension);
}
void NewClassWidget::slotActivated()
{
- if (m_d->m_valid)
+ if (d->m_valid)
emit activated();
}
diff --git a/src/libs/utils/newclasswidget.h b/src/libs/utils/newclasswidget.h
index cf2dd486ea..6ab8c0c6d8 100644
--- a/src/libs/utils/newclasswidget.h
+++ b/src/libs/utils/newclasswidget.h
@@ -160,7 +160,7 @@ private:
void setFormInputCheckable(bool checkable, bool force);
QString fixSuffix(const QString &suffix);
- NewClassWidgetPrivate *m_d;
+ NewClassWidgetPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index 4d29a0ac21..9cce3d8f52 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -241,30 +241,30 @@ QString PathChooserPrivate::expandedPath(const QString &input) const
PathChooser::PathChooser(QWidget *parent) :
QWidget(parent),
- m_d(new PathChooserPrivate(this))
+ d(new PathChooserPrivate(this))
{
- m_d->m_hLayout->setContentsMargins(0, 0, 0, 0);
+ d->m_hLayout->setContentsMargins(0, 0, 0, 0);
- connect(m_d->m_lineEdit, SIGNAL(validReturnPressed()), this, SIGNAL(returnPressed()));
- connect(m_d->m_lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(changed(QString)));
- connect(m_d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
- connect(m_d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool)));
- connect(m_d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
+ connect(d->m_lineEdit, SIGNAL(validReturnPressed()), this, SIGNAL(returnPressed()));
+ connect(d->m_lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(changed(QString)));
+ connect(d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
+ connect(d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool)));
+ connect(d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
- m_d->m_lineEdit->setMinimumWidth(200);
- m_d->m_hLayout->addWidget(m_d->m_lineEdit);
- m_d->m_hLayout->setSizeConstraint(QLayout::SetMinimumSize);
+ d->m_lineEdit->setMinimumWidth(200);
+ d->m_hLayout->addWidget(d->m_lineEdit);
+ d->m_hLayout->setSizeConstraint(QLayout::SetMinimumSize);
addButton(tr(browseButtonLabel), this, SLOT(slotBrowse()));
- setLayout(m_d->m_hLayout);
- setFocusProxy(m_d->m_lineEdit);
+ setLayout(d->m_hLayout);
+ setFocusProxy(d->m_lineEdit);
setEnvironment(Environment::systemEnvironment());
}
PathChooser::~PathChooser()
{
- delete m_d;
+ delete d;
}
void PathChooser::addButton(const QString &text, QObject *receiver, const char *slotFunc)
@@ -272,7 +272,7 @@ void PathChooser::addButton(const QString &text, QObject *receiver, const char *
QPushButton *button = new QPushButton;
button->setText(text);
connect(button, SIGNAL(clicked()), receiver, slotFunc);
- m_d->m_hLayout->addWidget(button);
+ d->m_hLayout->addWidget(button);
}
QAbstractButton *PathChooser::buttonAtIndex(int index) const
@@ -282,45 +282,45 @@ QAbstractButton *PathChooser::buttonAtIndex(int index) const
QString PathChooser::baseDirectory() const
{
- return m_d->m_baseDirectory;
+ return d->m_baseDirectory;
}
void PathChooser::setBaseDirectory(const QString &directory)
{
- m_d->m_baseDirectory = directory;
+ d->m_baseDirectory = directory;
}
void PathChooser::setEnvironment(const Utils::Environment &env)
{
QString oldExpand = path();
- m_d->m_environment = env;
+ d->m_environment = env;
if (path() != oldExpand)
emit changed(rawPath());
}
QString PathChooser::path() const
{
- return m_d->expandedPath(QDir::fromNativeSeparators(m_d->m_lineEdit->text()));
+ return d->expandedPath(QDir::fromNativeSeparators(d->m_lineEdit->text()));
}
QString PathChooser::rawPath() const
{
- return QDir::fromNativeSeparators(m_d->m_lineEdit->text());
+ return QDir::fromNativeSeparators(d->m_lineEdit->text());
}
void PathChooser::setPath(const QString &path)
{
- m_d->m_lineEdit->setText(QDir::toNativeSeparators(path));
+ d->m_lineEdit->setText(QDir::toNativeSeparators(path));
}
bool PathChooser::isReadOnly() const
{
- return m_d->m_lineEdit->isReadOnly();
+ return d->m_lineEdit->isReadOnly();
}
void PathChooser::setReadOnly(bool b)
{
- m_d->m_lineEdit->setReadOnly(b);
+ d->m_lineEdit->setReadOnly(b);
const QList<QAbstractButton *> &allButtons = findChildren<QAbstractButton *>();
foreach (QAbstractButton *button, allButtons)
button->setEnabled(!b);
@@ -332,15 +332,15 @@ void PathChooser::slotBrowse()
QString predefined = path();
if ((predefined.isEmpty() || !QFileInfo(predefined).isDir())
- && !m_d->m_initialBrowsePathOverride.isNull()) {
- predefined = m_d->m_initialBrowsePathOverride;
+ && !d->m_initialBrowsePathOverride.isNull()) {
+ predefined = d->m_initialBrowsePathOverride;
if (!QFileInfo(predefined).isDir())
predefined.clear();
}
// Prompt for a file/dir
QString newPath;
- switch (m_d->m_acceptingKind) {
+ switch (d->m_acceptingKind) {
case PathChooser::Directory:
case PathChooser::ExistingDirectory:
newPath = QFileDialog::getExistingDirectory(this,
@@ -350,12 +350,12 @@ void PathChooser::slotBrowse()
case PathChooser::Command:
newPath = QFileDialog::getOpenFileName(this,
makeDialogTitle(tr("Choose Executable")), predefined,
- m_d->m_dialogFilter);
+ d->m_dialogFilter);
break;
case PathChooser::File: // fall through
newPath = QFileDialog::getOpenFileName(this,
makeDialogTitle(tr("Choose File")), predefined,
- m_d->m_dialogFilter);
+ d->m_dialogFilter);
break;
case PathChooser::Any: {
QFileDialog dialog(this);
@@ -365,7 +365,7 @@ void PathChooser::slotBrowse()
if (fi.exists())
dialog.setDirectory(fi.absolutePath());
// FIXME: fix QFileDialog so that it filters properly: lib*.a
- dialog.setNameFilter(m_d->m_dialogFilter);
+ dialog.setNameFilter(d->m_dialogFilter);
if (dialog.exec() == QDialog::Accepted) {
// probably loop here until the *.framework dir match
QStringList paths = dialog.selectedFiles();
@@ -388,22 +388,22 @@ void PathChooser::slotBrowse()
}
emit browsingFinished();
- m_d->m_lineEdit->triggerChanged();
+ d->m_lineEdit->triggerChanged();
}
bool PathChooser::isValid() const
{
- return m_d->m_lineEdit->isValid();
+ return d->m_lineEdit->isValid();
}
QString PathChooser::errorMessage() const
{
- return m_d->m_lineEdit->errorMessage();
+ return d->m_lineEdit->errorMessage();
}
bool PathChooser::validatePath(const QString &path, QString *errorMessage)
{
- QString expandedPath = m_d->expandedPath(path);
+ QString expandedPath = d->expandedPath(path);
if (path.isEmpty()) {
if (errorMessage)
@@ -419,7 +419,7 @@ bool PathChooser::validatePath(const QString &path, QString *errorMessage)
const QFileInfo fi(expandedPath);
// Check if existing
- switch (m_d->m_acceptingKind) {
+ switch (d->m_acceptingKind) {
case PathChooser::ExistingDirectory: // fall through
if (!fi.exists()) {
if (errorMessage)
@@ -471,7 +471,7 @@ bool PathChooser::validatePath(const QString &path, QString *errorMessage)
}
// Check expected kind
- switch (m_d->m_acceptingKind) {
+ switch (d->m_acceptingKind) {
case PathChooser::ExistingDirectory:
if (!fi.isDir()) {
if (errorMessage)
@@ -528,56 +528,56 @@ QString PathChooser::homePath()
void PathChooser::setExpectedKind(Kind expected)
{
- if (m_d->m_acceptingKind == expected)
+ if (d->m_acceptingKind == expected)
return;
- m_d->m_acceptingKind = expected;
- m_d->m_lineEdit->triggerChanged();
+ d->m_acceptingKind = expected;
+ d->m_lineEdit->triggerChanged();
}
PathChooser::Kind PathChooser::expectedKind() const
{
- return m_d->m_acceptingKind;
+ return d->m_acceptingKind;
}
void PathChooser::setPromptDialogTitle(const QString &title)
{
- m_d->m_dialogTitleOverride = title;
+ d->m_dialogTitleOverride = title;
}
QString PathChooser::promptDialogTitle() const
{
- return m_d->m_dialogTitleOverride;
+ return d->m_dialogTitleOverride;
}
void PathChooser::setPromptDialogFilter(const QString &filter)
{
- m_d->m_dialogFilter = filter;
+ d->m_dialogFilter = filter;
}
QString PathChooser::promptDialogFilter() const
{
- return m_d->m_dialogFilter;
+ return d->m_dialogFilter;
}
void PathChooser::setInitialBrowsePathBackup(const QString &path)
{
- m_d->m_initialBrowsePathOverride = path;
+ d->m_initialBrowsePathOverride = path;
}
QString PathChooser::makeDialogTitle(const QString &title)
{
- if (m_d->m_dialogTitleOverride.isNull())
+ if (d->m_dialogTitleOverride.isNull())
return title;
else
- return m_d->m_dialogTitleOverride;
+ return d->m_dialogTitleOverride;
}
QLineEdit *PathChooser::lineEdit() const
{
// HACK: Make it work with HistoryCompleter.
- if (m_d->m_lineEdit->objectName().isEmpty())
- m_d->m_lineEdit->setObjectName(objectName() + QLatin1String("LineEdit"));
- return m_d->m_lineEdit;
+ if (d->m_lineEdit->objectName().isEmpty())
+ d->m_lineEdit->setObjectName(objectName() + QLatin1String("LineEdit"));
+ return d->m_lineEdit;
}
QString PathChooser::toolVersion(const QString &binary, const QStringList &arguments)
@@ -593,22 +593,22 @@ void PathChooser::installLineEditVersionToolTip(QLineEdit *le, const QStringList
QStringList PathChooser::commandVersionArguments() const
{
- return m_d->m_binaryVersionToolTipEventFilter ?
- m_d->m_binaryVersionToolTipEventFilter->arguments() :
+ return d->m_binaryVersionToolTipEventFilter ?
+ d->m_binaryVersionToolTipEventFilter->arguments() :
QStringList();
}
void PathChooser::setCommandVersionArguments(const QStringList &arguments)
{
if (arguments.isEmpty()) {
- if (m_d->m_binaryVersionToolTipEventFilter) {
- delete m_d->m_binaryVersionToolTipEventFilter;
- m_d->m_binaryVersionToolTipEventFilter = 0;
+ if (d->m_binaryVersionToolTipEventFilter) {
+ delete d->m_binaryVersionToolTipEventFilter;
+ d->m_binaryVersionToolTipEventFilter = 0;
}
} else {
- if (!m_d->m_binaryVersionToolTipEventFilter)
- m_d->m_binaryVersionToolTipEventFilter = new PathChooserBinaryVersionToolTipEventFilter(this);
- m_d->m_binaryVersionToolTipEventFilter->setArguments(arguments);
+ if (!d->m_binaryVersionToolTipEventFilter)
+ d->m_binaryVersionToolTipEventFilter = new PathChooserBinaryVersionToolTipEventFilter(this);
+ d->m_binaryVersionToolTipEventFilter->setArguments(arguments);
}
}
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h
index a9c47410e1..6084e8caea 100644
--- a/src/libs/utils/pathchooser.h
+++ b/src/libs/utils/pathchooser.h
@@ -144,7 +144,7 @@ private slots:
void slotBrowse();
private:
- PathChooserPrivate *m_d;
+ PathChooserPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/pathlisteditor.cpp b/src/libs/utils/pathlisteditor.cpp
index e508824d29..7db9714f01 100644
--- a/src/libs/utils/pathlisteditor.cpp
+++ b/src/libs/utils/pathlisteditor.cpp
@@ -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);
if (!dir.isEmpty())
appendPath(QDir::toNativeSeparators(dir));
}
void PathListEditor::slotInsert()
{
- const QString dir = QFileDialog::getExistingDirectory(this, m_d->fileDialogTitle);
+ const QString dir = QFileDialog::getExistingDirectory(this, d->fileDialogTitle);
if (!dir.isEmpty())
insertPathAtCursor(QDir::toNativeSeparators(dir));
}
@@ -267,31 +267,31 @@ QChar PathListEditor::separator()
// Add a button "Import from 'Path'"
void PathListEditor::addEnvVariableImportAction(const QString &var)
{
- if (!m_d->envVarMapper) {
- m_d->envVarMapper = new QSignalMapper(this);
- connect(m_d->envVarMapper, SIGNAL(mapped(QString)), this, SLOT(setPathListFromEnvVariable(QString)));
+ if (!d->envVarMapper) {
+ d->envVarMapper = new QSignalMapper(this);
+ connect(d->envVarMapper, SIGNAL(mapped(QString)), this, SLOT(setPathListFromEnvVariable(QString)));
}
QAction *a = insertAction(lastAddActionIndex() + 1,
- tr("From \"%1\"").arg(var), m_d->envVarMapper, SLOT(map()));
- m_d->envVarMapper->setMapping(a, var);
+ tr("From \"%1\"").arg(var), d->envVarMapper, SLOT(map()));
+ d->envVarMapper->setMapping(a, var);
}
QString PathListEditor::text() const
{
- return m_d->edit->toPlainText();
+ return d->edit->toPlainText();
}
void PathListEditor::setText(const QString &t)
{
- m_d->edit->setPlainText(t);
+ d->edit->setPlainText(t);
}
void PathListEditor::insertPathAtCursor(const QString &path)
{
// If the cursor is at an empty line or at end(),
// just insert. Else insert line before
- QTextCursor cursor = m_d->edit->textCursor();
+ QTextCursor cursor = d->edit->textCursor();
QTextBlock block = cursor.block();
const bool needNewLine = !block.text().isEmpty();
if (needNewLine) {
@@ -302,7 +302,7 @@ void PathListEditor::insertPathAtCursor(const QString &path)
cursor.insertText(path);
if (needNewLine) {
cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
- m_d->edit->setTextCursor(cursor);
+ d->edit->setTextCursor(cursor);
}
}
@@ -318,14 +318,14 @@ void PathListEditor::appendPath(const QString &path)
void PathListEditor::deletePathAtCursor()
{
// Delete current line
- QTextCursor cursor = m_d->edit->textCursor();
+ QTextCursor cursor = d->edit->textCursor();
if (cursor.block().isValid()) {
cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
// Select down or until end of [last] line
if (!cursor.movePosition(QTextCursor::Down, QTextCursor::KeepAnchor))
cursor.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
cursor.removeSelectedText();
- m_d->edit->setTextCursor(cursor);
+ d->edit->setTextCursor(cursor);
}
}
diff --git a/src/libs/utils/pathlisteditor.h b/src/libs/utils/pathlisteditor.h
index 0e1e6def76..a2391ea9d5 100644
--- a/src/libs/utils/pathlisteditor.h
+++ b/src/libs/utils/pathlisteditor.h
@@ -38,10 +38,6 @@
#include <QtGui/QWidget>
#include <QtCore/QStringList>
-QT_BEGIN_NAMESPACE
-class QAction;
-QT_END_NAMESPACE
-
namespace Utils {
struct PathListEditorPrivate;
@@ -91,7 +87,7 @@ private slots:
void slotInsert();
private:
- PathListEditorPrivate *m_d;
+ PathListEditorPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp
index 849584059a..1f4393bd94 100644
--- a/src/libs/utils/projectintropage.cpp
+++ b/src/libs/utils/projectintropage.cpp
@@ -83,58 +83,58 @@ ProjectIntroPagePrivate:: ProjectIntroPagePrivate() :
ProjectIntroPage::ProjectIntroPage(QWidget *parent) :
QWizardPage(parent),
- m_d(new ProjectIntroPagePrivate)
+ d(new ProjectIntroPagePrivate)
{
- m_d->m_ui.setupUi(this);
+ d->m_ui.setupUi(this);
hideStatusLabel();
- m_d->m_ui.nameLineEdit->setInitialText(tr("<Enter_Name>"));
- m_d->m_ui.nameLineEdit->setFocus();
- connect(m_d->m_ui.pathChooser, SIGNAL(changed(QString)), this, SLOT(slotChanged()));
- connect(m_d->m_ui.nameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotChanged()));
- connect(m_d->m_ui.pathChooser, SIGNAL(validChanged()), this, SLOT(slotChanged()));
- connect(m_d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
- connect(m_d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
+ d->m_ui.nameLineEdit->setInitialText(tr("<Enter_Name>"));
+ d->m_ui.nameLineEdit->setFocus();
+ connect(d->m_ui.pathChooser, SIGNAL(changed(QString)), this, SLOT(slotChanged()));
+ connect(d->m_ui.nameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotChanged()));
+ connect(d->m_ui.pathChooser, SIGNAL(validChanged()), this, SLOT(slotChanged()));
+ connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
+ connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
}
void ProjectIntroPage::insertControl(int row, QWidget *label, QWidget *control)
{
- m_d->m_ui.formLayout->insertRow(row, label, control);
+ d->m_ui.formLayout->insertRow(row, label, control);
}
ProjectIntroPage::~ProjectIntroPage()
{
- delete m_d;
+ delete d;
}
QString ProjectIntroPage::projectName() const
{
- return m_d->m_ui.nameLineEdit->text();
+ return d->m_ui.nameLineEdit->text();
}
QString ProjectIntroPage::path() const
{
- return m_d->m_ui.pathChooser->path();
+ return d->m_ui.pathChooser->path();
}
void ProjectIntroPage::setPath(const QString &path)
{
- m_d->m_ui.pathChooser->setPath(path);
+ d->m_ui.pathChooser->setPath(path);
}
void ProjectIntroPage::setProjectName(const QString &name)
{
- m_d->m_ui.nameLineEdit->setText(name);
- m_d->m_ui.nameLineEdit->selectAll();
+ d->m_ui.nameLineEdit->setText(name);
+ d->m_ui.nameLineEdit->selectAll();
}
QString ProjectIntroPage::description() const
{
- return m_d->m_ui.descriptionLabel->text();
+ return d->m_ui.descriptionLabel->text();
}
void ProjectIntroPage::setDescription(const QString &description)
{
- m_d->m_ui.descriptionLabel->setText(description);
+ d->m_ui.descriptionLabel->setText(description);
}
void ProjectIntroPage::changeEvent(QEvent *e)
@@ -142,7 +142,7 @@ void ProjectIntroPage::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;
@@ -151,22 +151,22 @@ void ProjectIntroPage::changeEvent(QEvent *e)
bool ProjectIntroPage::isComplete() const
{
- return m_d->m_complete;
+ return d->m_complete;
}
bool ProjectIntroPage::validate()
{
// Validate and display status
- if (!m_d->m_ui.pathChooser->isValid()) {
- displayStatusMessage(Error, m_d->m_ui.pathChooser->errorMessage());
+ if (!d->m_ui.pathChooser->isValid()) {
+ displayStatusMessage(Error, d->m_ui.pathChooser->errorMessage());
return false;
}
// Name valid? Ignore 'DisplayingInitialText' state.
bool nameValid = false;
- switch (m_d->m_ui.nameLineEdit->state()) {
+ switch (d->m_ui.nameLineEdit->state()) {
case BaseValidatingLineEdit::Invalid:
- displayStatusMessage(Error, m_d->m_ui.nameLineEdit->errorMessage());
+ displayStatusMessage(Error, d->m_ui.nameLineEdit->errorMessage());
return false;
case BaseValidatingLineEdit::DisplayingInitialText:
break;
@@ -178,7 +178,7 @@ bool ProjectIntroPage::validate()
// Check existence of the directory
QString projectDir = path();
projectDir += QDir::separator();
- projectDir += m_d->m_ui.nameLineEdit->text();
+ projectDir += d->m_ui.nameLineEdit->text();
const QFileInfo projectDirFile(projectDir);
if (!projectDirFile.exists()) { // All happy
hideStatusLabel();
@@ -197,15 +197,15 @@ bool ProjectIntroPage::validate()
void ProjectIntroPage::slotChanged()
{
const bool newComplete = validate();
- if (newComplete != m_d->m_complete) {
- m_d->m_complete = newComplete;
+ if (newComplete != d->m_complete) {
+ d->m_complete = newComplete;
emit completeChanged();
}
}
void ProjectIntroPage::slotActivated()
{
- if (m_d->m_complete)
+ if (d->m_complete)
emit activated();
}
@@ -218,16 +218,16 @@ void ProjectIntroPage::displayStatusMessage(StatusLabelMode m, const QString &s)
{
switch (m) {
case Error:
- m_d->m_ui.stateLabel->setStyleSheet(m_d->m_errorStyleSheet);
+ d->m_ui.stateLabel->setStyleSheet(d->m_errorStyleSheet);
break;
case Warning:
- m_d->m_ui.stateLabel->setStyleSheet(m_d->m_warningStyleSheet);
+ d->m_ui.stateLabel->setStyleSheet(d->m_warningStyleSheet);
break;
case Hint:
- m_d->m_ui.stateLabel->setStyleSheet(m_d->m_hintStyleSheet);
+ d->m_ui.stateLabel->setStyleSheet(d->m_hintStyleSheet);
break;
}
- m_d->m_ui.stateLabel->setText(s);
+ d->m_ui.stateLabel->setText(s);
}
void ProjectIntroPage::hideStatusLabel()
@@ -237,12 +237,12 @@ void ProjectIntroPage::hideStatusLabel()
bool ProjectIntroPage::useAsDefaultPath() const
{
- return m_d->m_ui.projectsDirectoryCheckBox->isChecked();
+ return d->m_ui.projectsDirectoryCheckBox->isChecked();
}
void ProjectIntroPage::setUseAsDefaultPath(bool u)
{
- m_d->m_ui.projectsDirectoryCheckBox->setChecked(u);
+ d->m_ui.projectsDirectoryCheckBox->setChecked(u);
}
} // namespace Utils
diff --git a/src/libs/utils/projectintropage.h b/src/libs/utils/projectintropage.h
index 34f8a025e0..1ba9190d8c 100644
--- a/src/libs/utils/projectintropage.h
+++ b/src/libs/utils/projectintropage.h
@@ -88,7 +88,7 @@ private:
void displayStatusMessage(StatusLabelMode m, const QString &);
void hideStatusLabel();
- ProjectIntroPagePrivate *m_d;
+ ProjectIntroPagePrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/submiteditorwidget.cpp b/src/libs/utils/submiteditorwidget.cpp
index d5d2a9ad73..4bc9c92f78 100644
--- a/src/libs/utils/submiteditorwidget.cpp
+++ b/src/libs/utils/submiteditorwidget.cpp
@@ -195,78 +195,78 @@ SubmitEditorWidgetPrivate::SubmitEditorWidgetPrivate() :
SubmitEditorWidget::SubmitEditorWidget(QWidget *parent) :
QWidget(parent),
- m_d(new SubmitEditorWidgetPrivate)
+ d(new SubmitEditorWidgetPrivate)
{
- m_d->m_ui.setupUi(this);
- m_d->m_ui.description->setContextMenuPolicy(Qt::CustomContextMenu);
- m_d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap);
- m_d->m_ui.description->setWordWrapMode(QTextOption::WordWrap);
- connect(m_d->m_ui.description, SIGNAL(customContextMenuRequested(QPoint)),
+ d->m_ui.setupUi(this);
+ d->m_ui.description->setContextMenuPolicy(Qt::CustomContextMenu);
+ d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap);
+ d->m_ui.description->setWordWrapMode(QTextOption::WordWrap);
+ connect(d->m_ui.description, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(editorCustomContextMenuRequested(QPoint)));
- connect(m_d->m_ui.description, SIGNAL(textChanged()),
+ connect(d->m_ui.description, SIGNAL(textChanged()),
this, SLOT(updateSubmitAction()));
// File List
- m_d->m_ui.fileView->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(m_d->m_ui.fileView, SIGNAL(customContextMenuRequested(QPoint)),
+ d->m_ui.fileView->setContextMenuPolicy(Qt::CustomContextMenu);
+ connect(d->m_ui.fileView, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(fileListCustomContextMenuRequested(QPoint)));
- m_d->m_ui.fileView->setSelectionMode(QAbstractItemView::ExtendedSelection);
- m_d->m_ui.fileView->setRootIsDecorated(false);
- connect(m_d->m_ui.fileView, SIGNAL(doubleClicked(QModelIndex)),
+ d->m_ui.fileView->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ d->m_ui.fileView->setRootIsDecorated(false);
+ connect(d->m_ui.fileView, SIGNAL(doubleClicked(QModelIndex)),
this, SLOT(diffActivated(QModelIndex)));
- connect(m_d->m_ui.checkAllCheckBox, SIGNAL(stateChanged(int)),
+ connect(d->m_ui.checkAllCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(checkAllToggled()));
setFocusPolicy(Qt::StrongFocus);
- setFocusProxy(m_d->m_ui.description);
+ setFocusProxy(d->m_ui.description);
}
SubmitEditorWidget::~SubmitEditorWidget()
{
- delete m_d;
+ delete d;
}
void SubmitEditorWidget::registerActions(QAction *editorUndoAction, QAction *editorRedoAction,
QAction *submitAction, QAction *diffAction)
{
if (editorUndoAction) {
- editorUndoAction->setEnabled(m_d->m_ui.description->document()->isUndoAvailable());
- connect(m_d->m_ui.description, SIGNAL(undoAvailable(bool)), editorUndoAction, SLOT(setEnabled(bool)));
- connect(editorUndoAction, SIGNAL(triggered()), m_d->m_ui.description, SLOT(undo()));
+ editorUndoAction->setEnabled(d->m_ui.description->document()->isUndoAvailable());
+ connect(d->m_ui.description, SIGNAL(undoAvailable(bool)), editorUndoAction, SLOT(setEnabled(bool)));
+ connect(editorUndoAction, SIGNAL(triggered()), d->m_ui.description, SLOT(undo()));
}
if (editorRedoAction) {
- editorRedoAction->setEnabled(m_d->m_ui.description->document()->isRedoAvailable());
- connect(m_d->m_ui.description, SIGNAL(redoAvailable(bool)), editorRedoAction, SLOT(setEnabled(bool)));
- connect(editorRedoAction, SIGNAL(triggered()), m_d->m_ui.description, SLOT(redo()));
+ editorRedoAction->setEnabled(d->m_ui.description->document()->isRedoAvailable());
+ connect(d->m_ui.description, SIGNAL(redoAvailable(bool)), editorRedoAction, SLOT(setEnabled(bool)));
+ connect(editorRedoAction, SIGNAL(triggered()), d->m_ui.description, SLOT(redo()));
}
if (submitAction) {
if (debug) {
int count = 0;
- if (const QAbstractItemModel *model = m_d->m_ui.fileView->model())
+ if (const QAbstractItemModel *model = d->m_ui.fileView->model())
count = model->rowCount();
qDebug() << Q_FUNC_INFO << submitAction << count << "items";
}
- m_d->m_commitEnabled = !canSubmit();
+ d->m_commitEnabled = !canSubmit();
connect(this, SIGNAL(submitActionEnabledChanged(bool)), submitAction, SLOT(setEnabled(bool)));
// Wire setText via QActionSetTextSlotHelper.
QActionSetTextSlotHelper *actionSlotHelper = submitAction->findChild<QActionSetTextSlotHelper *>();
if (!actionSlotHelper)
actionSlotHelper = new QActionSetTextSlotHelper(submitAction);
connect(this, SIGNAL(submitActionTextChanged(QString)), actionSlotHelper, SLOT(setText(QString)));
- m_d->m_ui.buttonLayout->addWidget(new QActionPushButton(submitAction));
- if (!m_d->m_submitShortcut)
- m_d->m_submitShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Return), this);
- connect(m_d->m_submitShortcut, SIGNAL(activated()), submitAction, SLOT(trigger()));
+ d->m_ui.buttonLayout->addWidget(new QActionPushButton(submitAction));
+ if (!d->m_submitShortcut)
+ d->m_submitShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Return), this);
+ connect(d->m_submitShortcut, SIGNAL(activated()), submitAction, SLOT(trigger()));
}
if (diffAction) {
if (debug)
- qDebug() << diffAction << m_d->m_filesSelected;
- diffAction->setEnabled(m_d->m_filesSelected);
+ qDebug() << diffAction << d->m_filesSelected;
+ diffAction->setEnabled(d->m_filesSelected);
connect(this, SIGNAL(fileSelectionChanged(bool)), diffAction, SLOT(setEnabled(bool)));
connect(diffAction, SIGNAL(triggered()), this, SLOT(triggerDiffSelected()));
- m_d->m_ui.buttonLayout->addWidget(new QActionPushButton(diffAction));
+ d->m_ui.buttonLayout->addWidget(new QActionPushButton(diffAction));
}
}
@@ -274,12 +274,12 @@ void SubmitEditorWidget::unregisterActions(QAction *editorUndoAction, QAction *
QAction *submitAction, QAction *diffAction)
{
if (editorUndoAction) {
- disconnect(m_d->m_ui.description, SIGNAL(undoAvailableChanged(bool)), editorUndoAction, SLOT(setEnabled(bool)));
- disconnect(editorUndoAction, SIGNAL(triggered()), m_d->m_ui.description, SLOT(undo()));
+ disconnect(d->m_ui.description, SIGNAL(undoAvailableChanged(bool)), editorUndoAction, SLOT(setEnabled(bool)));
+ disconnect(editorUndoAction, SIGNAL(triggered()), d->m_ui.description, SLOT(undo()));
}
if (editorRedoAction) {
- disconnect(m_d->m_ui.description, SIGNAL(redoAvailableChanged(bool)), editorRedoAction, SLOT(setEnabled(bool)));
- disconnect(editorRedoAction, SIGNAL(triggered()), m_d->m_ui.description, SLOT(redo()));
+ disconnect(d->m_ui.description, SIGNAL(redoAvailableChanged(bool)), editorRedoAction, SLOT(setEnabled(bool)));
+ disconnect(editorRedoAction, SIGNAL(triggered()), d->m_ui.description, SLOT(redo()));
}
if (submitAction) {
@@ -330,22 +330,22 @@ static QString wrappedText(const QTextEdit *e)
QString SubmitEditorWidget::descriptionText() const
{
- QString rc = trimMessageText(lineWrap() ? wrappedText(m_d->m_ui.description) :
- m_d->m_ui.description->toPlainText());
+ QString rc = trimMessageText(lineWrap() ? wrappedText(d->m_ui.description) :
+ d->m_ui.description->toPlainText());
// append field entries
- foreach(const SubmitFieldWidget *fw, m_d->m_fieldWidgets)
+ foreach(const SubmitFieldWidget *fw, d->m_fieldWidgets)
rc += fw->fieldValues();
return cleanupDescription(rc);
}
void SubmitEditorWidget::setDescriptionText(const QString &text)
{
- m_d->m_ui.description->setPlainText(text);
+ d->m_ui.description->setPlainText(text);
}
bool SubmitEditorWidget::lineWrap() const
{
- return m_d->m_ui.description->lineWrapMode() != QTextEdit::NoWrap;
+ return d->m_ui.description->lineWrapMode() != QTextEdit::NoWrap;
}
void SubmitEditorWidget::setLineWrap(bool v)
@@ -353,59 +353,59 @@ void SubmitEditorWidget::setLineWrap(bool v)
if (debug)
qDebug() << Q_FUNC_INFO << v;
if (v) {
- m_d->m_ui.description->setLineWrapColumnOrWidth(m_d->m_lineWidth);
- m_d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth);
+ d->m_ui.description->setLineWrapColumnOrWidth(d->m_lineWidth);
+ d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth);
} else {
- m_d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap);
+ d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap);
}
}
int SubmitEditorWidget::lineWrapWidth() const
{
- return m_d->m_lineWidth;
+ return d->m_lineWidth;
}
void SubmitEditorWidget::setLineWrapWidth(int v)
{
if (debug)
qDebug() << Q_FUNC_INFO << v << lineWrap();
- if (m_d->m_lineWidth == v)
+ if (d->m_lineWidth == v)
return;
- m_d->m_lineWidth = v;
+ d->m_lineWidth = v;
if (lineWrap())
- m_d->m_ui.description->setLineWrapColumnOrWidth(v);
+ d->m_ui.description->setLineWrapColumnOrWidth(v);
}
int SubmitEditorWidget::fileNameColumn() const
{
- return m_d->m_fileNameColumn;
+ return d->m_fileNameColumn;
}
void SubmitEditorWidget::setFileNameColumn(int c)
{
- m_d->m_fileNameColumn = c;
+ d->m_fileNameColumn = c;
}
QAbstractItemView::SelectionMode SubmitEditorWidget::fileListSelectionMode() const
{
- return m_d->m_ui.fileView->selectionMode();
+ return d->m_ui.fileView->selectionMode();
}
void SubmitEditorWidget::setFileListSelectionMode(QAbstractItemView::SelectionMode sm)
{
- m_d->m_ui.fileView->setSelectionMode(sm);
+ d->m_ui.fileView->setSelectionMode(sm);
}
void SubmitEditorWidget::setFileModel(QAbstractItemModel *model)
{
- m_d->m_ui.fileView->clearSelection(); // trigger the change signals
+ d->m_ui.fileView->clearSelection(); // trigger the change signals
- m_d->m_ui.fileView->setModel(model);
+ d->m_ui.fileView->setModel(model);
if (model->rowCount()) {
const int columnCount = model->columnCount();
for (int c = 0; c < columnCount; c++)
- m_d->m_ui.fileView->resizeColumnToContents(c);
+ d->m_ui.fileView->resizeColumnToContents(c);
}
connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
@@ -420,24 +420,24 @@ void SubmitEditorWidget::setFileModel(QAbstractItemModel *model)
this, SLOT(updateSubmitAction()));
connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(updateSubmitAction()));
- connect(m_d->m_ui.fileView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
+ connect(d->m_ui.fileView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this, SLOT(updateDiffAction()));
updateActions();
}
QAbstractItemModel *SubmitEditorWidget::fileModel() const
{
- return m_d->m_ui.fileView->model();
+ return d->m_ui.fileView->model();
}
QStringList SubmitEditorWidget::selectedFiles() const
{
- const QList<int> selection = selectedRows(m_d->m_ui.fileView);
+ const QList<int> selection = selectedRows(d->m_ui.fileView);
if (selection.empty())
return QStringList();
QStringList rc;
- const QAbstractItemModel *model = m_d->m_ui.fileView->model();
+ const QAbstractItemModel *model = d->m_ui.fileView->model();
const int count = selection.size();
for (int i = 0; i < count; i++)
rc.push_back(listModelText(model, selection.at(i), fileNameColumn()));
@@ -447,7 +447,7 @@ QStringList SubmitEditorWidget::selectedFiles() const
QStringList SubmitEditorWidget::checkedFiles() const
{
QStringList rc;
- const QAbstractItemModel *model = m_d->m_ui.fileView->model();
+ const QAbstractItemModel *model = d->m_ui.fileView->model();
if (!model)
return rc;
const int count = model->rowCount();
@@ -459,7 +459,7 @@ QStringList SubmitEditorWidget::checkedFiles() const
QTextEdit *SubmitEditorWidget::descriptionEdit() const
{
- return m_d->m_ui.description;
+ return d->m_ui.description;
}
void SubmitEditorWidget::triggerDiffSelected()
@@ -471,7 +471,7 @@ void SubmitEditorWidget::triggerDiffSelected()
void SubmitEditorWidget::diffActivatedDelayed()
{
- const QStringList files = QStringList(listModelText(m_d->m_ui.fileView->model(), m_d->m_activatedRow, fileNameColumn()));
+ const QStringList files = QStringList(listModelText(d->m_ui.fileView->model(), d->m_activatedRow, fileNameColumn()));
emit diffSelected(files);
}
@@ -479,7 +479,7 @@ void SubmitEditorWidget::diffActivated(const QModelIndex &index)
{
// We need to delay the signal, otherwise, the diff editor will not
// be in the foreground.
- m_d->m_activatedRow = index.row();
+ d->m_activatedRow = index.row();
QTimer::singleShot(0, this, SLOT(diffActivatedDelayed()));
}
@@ -496,13 +496,13 @@ void SubmitEditorWidget::updateSubmitAction()
const unsigned checkedCount = checkedFilesCount();
const bool newCommitState = canSubmit();
// Emit signal to update action
- if (m_d->m_commitEnabled != newCommitState) {
- m_d->m_commitEnabled = newCommitState;
- emit submitActionEnabledChanged(m_d->m_commitEnabled);
+ if (d->m_commitEnabled != newCommitState) {
+ d->m_commitEnabled = newCommitState;
+ emit submitActionEnabledChanged(d->m_commitEnabled);
}
- if (m_d->m_ui.fileView && m_d->m_ui.fileView->model()) {
+ if (d->m_ui.fileView && d->m_ui.fileView->model()) {
// Update button text.
- const int fileCount = m_d->m_ui.fileView->model()->rowCount();
+ const int fileCount = d->m_ui.fileView->model()->rowCount();
const QString msg = checkedCount ?
tr("%1 %2/%n File(s)", 0, fileCount)
.arg(commitName()).arg(checkedCount) :
@@ -515,29 +515,29 @@ void SubmitEditorWidget::updateSubmitAction()
void SubmitEditorWidget::updateDiffAction()
{
const bool filesSelected = hasSelection();
- if (m_d->m_filesSelected != filesSelected) {
- m_d->m_filesSelected = filesSelected;
- emit fileSelectionChanged(m_d->m_filesSelected);
+ if (d->m_filesSelected != filesSelected) {
+ d->m_filesSelected = filesSelected;
+ emit fileSelectionChanged(d->m_filesSelected);
}
}
void SubmitEditorWidget::updateCheckAllComboBox()
{
- m_d->m_ignoreChange = true;
+ d->m_ignoreChange = true;
int checkedCount = checkedFilesCount();
if (checkedCount == 0)
- m_d->m_ui.checkAllCheckBox->setCheckState(Qt::Unchecked);
- else if (checkedCount == m_d->m_ui.fileView->model()->rowCount())
- m_d->m_ui.checkAllCheckBox->setCheckState(Qt::Checked);
+ d->m_ui.checkAllCheckBox->setCheckState(Qt::Unchecked);
+ else if (checkedCount == d->m_ui.fileView->model()->rowCount())
+ d->m_ui.checkAllCheckBox->setCheckState(Qt::Checked);
else
- m_d->m_ui.checkAllCheckBox->setCheckState(Qt::PartiallyChecked);
- m_d->m_ignoreChange = false;
+ d->m_ui.checkAllCheckBox->setCheckState(Qt::PartiallyChecked);
+ d->m_ignoreChange = false;
}
bool SubmitEditorWidget::hasSelection() const
{
// Not present until model is set
- if (const QItemSelectionModel *sm = m_d->m_ui.fileView->selectionModel())
+ if (const QItemSelectionModel *sm = d->m_ui.fileView->selectionModel())
return sm->hasSelection();
return false;
}
@@ -545,7 +545,7 @@ bool SubmitEditorWidget::hasSelection() const
int SubmitEditorWidget::checkedFilesCount() const
{
int checkedCount = 0;
- if (const QAbstractItemModel *model = m_d->m_ui.fileView->model()) {
+ if (const QAbstractItemModel *model = d->m_ui.fileView->model()) {
const int count = model->rowCount();
for (int i = 0; i < count; ++i)
if (listModelChecked(model, i, checkableColumn))
@@ -564,7 +564,7 @@ void SubmitEditorWidget::changeEvent(QEvent *e)
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
- m_d->m_ui.retranslateUi(this);
+ d->m_ui.retranslateUi(this);
break;
default:
break;
@@ -573,13 +573,13 @@ void SubmitEditorWidget::changeEvent(QEvent *e)
void SubmitEditorWidget::insertTopWidget(QWidget *w)
{
- m_d->m_ui.vboxLayout->insertWidget(0, w);
+ d->m_ui.vboxLayout->insertWidget(0, w);
}
bool SubmitEditorWidget::canSubmit() const
{
const unsigned checkedCount = checkedFilesCount();
- return m_d->m_emptyFileListEnabled || checkedCount > 0;
+ return d->m_emptyFileListEnabled || checkedCount > 0;
}
QString SubmitEditorWidget::commitName() const
@@ -589,40 +589,40 @@ QString SubmitEditorWidget::commitName() const
void SubmitEditorWidget::addSubmitFieldWidget(SubmitFieldWidget *f)
{
- if (!m_d->m_fieldLayout) {
+ if (!d->m_fieldLayout) {
// VBox with horizontal, expanding spacer
- m_d->m_fieldLayout = new QVBoxLayout;
+ d->m_fieldLayout = new QVBoxLayout;
QHBoxLayout *outerLayout = new QHBoxLayout;
- outerLayout->addLayout(m_d->m_fieldLayout);
+ outerLayout->addLayout(d->m_fieldLayout);
outerLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored));
- QBoxLayout *descrLayout = qobject_cast<QBoxLayout*>(m_d->m_ui.descriptionBox->layout());
+ QBoxLayout *descrLayout = qobject_cast<QBoxLayout*>(d->m_ui.descriptionBox->layout());
Q_ASSERT(descrLayout);
descrLayout->addLayout(outerLayout);
}
- m_d->m_fieldLayout->addWidget(f);
- m_d->m_fieldWidgets.push_back(f);
+ d->m_fieldLayout->addWidget(f);
+ d->m_fieldWidgets.push_back(f);
}
QList<SubmitFieldWidget *> SubmitEditorWidget::submitFieldWidgets() const
{
- return m_d->m_fieldWidgets;
+ return d->m_fieldWidgets;
}
void SubmitEditorWidget::addDescriptionEditContextMenuAction(QAction *a)
{
- m_d->descriptionEditContextMenuActions.push_back(SubmitEditorWidgetPrivate::AdditionalContextMenuAction(-1, a));
+ d->descriptionEditContextMenuActions.push_back(SubmitEditorWidgetPrivate::AdditionalContextMenuAction(-1, a));
}
void SubmitEditorWidget::insertDescriptionEditContextMenuAction(int pos, QAction *a)
{
- m_d->descriptionEditContextMenuActions.push_back(SubmitEditorWidgetPrivate::AdditionalContextMenuAction(pos, a));
+ d->descriptionEditContextMenuActions.push_back(SubmitEditorWidgetPrivate::AdditionalContextMenuAction(pos, a));
}
void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos)
{
- QScopedPointer<QMenu> menu(m_d->m_ui.description->createStandardContextMenu());
+ QScopedPointer<QMenu> menu(d->m_ui.description->createStandardContextMenu());
// Extend
- foreach (const SubmitEditorWidgetPrivate::AdditionalContextMenuAction &a, m_d->descriptionEditContextMenuActions) {
+ foreach (const SubmitEditorWidgetPrivate::AdditionalContextMenuAction &a, d->descriptionEditContextMenuActions) {
if (a.second) {
if (a.first >= 0) {
menu->insertAction(menu->actions().at(a.first), a.second);
@@ -631,31 +631,31 @@ void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos)
}
}
}
- menu->exec(m_d->m_ui.description->mapToGlobal(pos));
+ menu->exec(d->m_ui.description->mapToGlobal(pos));
}
void SubmitEditorWidget::checkAllToggled()
{
- if (m_d->m_ignoreChange)
+ if (d->m_ignoreChange)
return;
- if (m_d->m_ui.checkAllCheckBox->checkState() == Qt::Checked
- || m_d->m_ui.checkAllCheckBox->checkState() == Qt::PartiallyChecked) {
- setListModelChecked(m_d->m_ui.fileView->model(), true, checkableColumn);
+ if (d->m_ui.checkAllCheckBox->checkState() == Qt::Checked
+ || d->m_ui.checkAllCheckBox->checkState() == Qt::PartiallyChecked) {
+ setListModelChecked(d->m_ui.fileView->model(), true, checkableColumn);
} else {
- setListModelChecked(m_d->m_ui.fileView->model(), false, checkableColumn);
+ setListModelChecked(d->m_ui.fileView->model(), false, checkableColumn);
}
// Reset that again, so that the user can't do it
- m_d->m_ui.checkAllCheckBox->setTristate(false);
+ d->m_ui.checkAllCheckBox->setTristate(false);
}
void SubmitEditorWidget::checkAll()
{
- setListModelChecked(m_d->m_ui.fileView->model(), true, checkableColumn);
+ setListModelChecked(d->m_ui.fileView->model(), true, checkableColumn);
}
void SubmitEditorWidget::uncheckAll()
{
- setListModelChecked(m_d->m_ui.fileView->model(), false, checkableColumn);
+ setListModelChecked(d->m_ui.fileView->model(), false, checkableColumn);
}
void SubmitEditorWidget::fileListCustomContextMenuRequested(const QPoint & pos)
@@ -666,7 +666,7 @@ void SubmitEditorWidget::fileListCustomContextMenuRequested(const QPoint & pos)
QAction *checkAllAction = menu.addAction(tr("Check All"));
//: Uncheck all for submit
QAction *uncheckAllAction = menu.addAction(tr("Uncheck All"));
- QAction *action = menu.exec(m_d->m_ui.fileView->mapToGlobal(pos));
+ QAction *action = menu.exec(d->m_ui.fileView->mapToGlobal(pos));
if (action == checkAllAction) {
checkAll();
return;
@@ -679,13 +679,13 @@ void SubmitEditorWidget::fileListCustomContextMenuRequested(const QPoint & pos)
bool SubmitEditorWidget::isEmptyFileListEnabled() const
{
- return m_d->m_emptyFileListEnabled;
+ return d->m_emptyFileListEnabled;
}
void SubmitEditorWidget::setEmptyFileListEnabled(bool e)
{
- if (e != m_d->m_emptyFileListEnabled) {
- m_d->m_emptyFileListEnabled = e;
+ if (e != d->m_emptyFileListEnabled) {
+ d->m_emptyFileListEnabled = e;
updateSubmitAction();
}
}
diff --git a/src/libs/utils/submiteditorwidget.h b/src/libs/utils/submiteditorwidget.h
index 61e05a7f80..91e98da4fd 100644
--- a/src/libs/utils/submiteditorwidget.h
+++ b/src/libs/utils/submiteditorwidget.h
@@ -146,7 +146,7 @@ private:
bool hasSelection() const;
int checkedFilesCount() const;
- SubmitEditorWidgetPrivate *m_d;
+ SubmitEditorWidgetPrivate *d;
};
} // namespace Utils
diff --git a/src/libs/utils/submitfieldwidget.cpp b/src/libs/utils/submitfieldwidget.cpp
index bbd6aac459..5be5cfae15 100644
--- a/src/libs/utils/submitfieldwidget.cpp
+++ b/src/libs/utils/submitfieldwidget.cpp
@@ -191,81 +191,81 @@ void SubmitFieldWidgetPrivate::focusField(int pos)
// SubmitFieldWidget
SubmitFieldWidget::SubmitFieldWidget(QWidget *parent) :
QWidget(parent),
- m_d(new SubmitFieldWidgetPrivate)
+ d(new SubmitFieldWidgetPrivate)
{
- m_d->layout = new QVBoxLayout;
- m_d->layout->setMargin(0);
- m_d->layout->setSpacing(spacing);
- setLayout(m_d->layout);
+ d->layout = new QVBoxLayout;
+ d->layout->setMargin(0);
+ d->layout->setSpacing(spacing);
+ setLayout(d->layout);
}
SubmitFieldWidget::~SubmitFieldWidget()
{
- delete m_d;
+ delete d;
}
void SubmitFieldWidget::setFields(const QStringList & f)
{
// remove old fields
- for (int i = m_d->fieldEntries.size() - 1 ; i >= 0 ; i--)
+ for (int i = d->fieldEntries.size() - 1 ; i >= 0 ; i--)
removeField(i);
- m_d->fields = f;
+ d->fields = f;
if (!f.empty())
createField(f.front());
}
QStringList SubmitFieldWidget::fields() const
{
- return m_d->fields;
+ return d->fields;
}
bool SubmitFieldWidget::hasBrowseButton() const
{
- return m_d->hasBrowseButton;
+ return d->hasBrowseButton;
}
-void SubmitFieldWidget::setHasBrowseButton(bool d)
+void SubmitFieldWidget::setHasBrowseButton(bool on)
{
- if (m_d->hasBrowseButton == d)
+ if (d->hasBrowseButton == on)
return;
- m_d->hasBrowseButton = d;
- foreach(const FieldEntry &fe, m_d->fieldEntries)
- fe.browseButton->setVisible(d);
+ d->hasBrowseButton = on;
+ foreach(const FieldEntry &fe, d->fieldEntries)
+ fe.browseButton->setVisible(on);
}
bool SubmitFieldWidget::allowDuplicateFields() const
{
- return m_d->allowDuplicateFields;
+ return d->allowDuplicateFields;
}
void SubmitFieldWidget::setAllowDuplicateFields(bool v)
{
- m_d->allowDuplicateFields = v;
+ d->allowDuplicateFields = v;
}
QCompleter *SubmitFieldWidget::completer() const
{
- return m_d->completer;
+ return d->completer;
}
void SubmitFieldWidget::setCompleter(QCompleter *c)
{
- if (c == m_d->completer)
+ if (c == d->completer)
return;
- m_d->completer = c;
- foreach(const FieldEntry &fe, m_d->fieldEntries)
+ d->completer = c;
+ foreach(const FieldEntry &fe, d->fieldEntries)
fe.lineEdit->setCompleter(c);
}
QString SubmitFieldWidget::fieldValue(int pos) const
{
- return m_d->fieldValue(pos);
+ return d->fieldValue(pos);
}
void SubmitFieldWidget::setFieldValue(int pos, const QString &value)
{
- m_d->fieldEntries.at(pos).lineEdit->setText(value);
+ d->fieldEntries.at(pos).lineEdit->setText(value);
}
QString SubmitFieldWidget::fieldValues() const
@@ -274,7 +274,7 @@ QString SubmitFieldWidget::fieldValues() const
const QChar newLine = QLatin1Char('\n');
// Format as "RevBy: value\nSigned-Off: value\n"
QString rc;
- foreach(const FieldEntry &fe, m_d->fieldEntries) {
+ foreach(const FieldEntry &fe, d->fieldEntries) {
const QString value = fe.lineEdit->text().trimmed();
if (!value.isEmpty()) {
rc += fe.combo->currentText();
@@ -289,8 +289,8 @@ QString SubmitFieldWidget::fieldValues() const
void SubmitFieldWidget::createField(const QString &f)
{
FieldEntry fe;
- fe.createGui(m_d->removeFieldIcon);
- fe.combo->addItems(m_d->fields);
+ fe.createGui(d->removeFieldIcon);
+ fe.combo->addItems(d->fields);
if (!f.isEmpty()) {
const int index = fe.combo->findText(f);
if (index != -1) {
@@ -300,29 +300,29 @@ void SubmitFieldWidget::createField(const QString &f)
}
connect(fe.browseButton, SIGNAL(clicked()), this, SLOT(slotBrowseButtonClicked()));
- if (!m_d->hasBrowseButton)
+ if (!d->hasBrowseButton)
fe.browseButton->setVisible(false);
- if (m_d->completer)
- fe.lineEdit->setCompleter(m_d->completer);
+ if (d->completer)
+ fe.lineEdit->setCompleter(d->completer);
connect(fe.combo, SIGNAL(currentIndexChanged(int)),
this, SLOT(slotComboIndexChanged(int)));
connect(fe.clearButton, SIGNAL(clicked()),
this, SLOT(slotRemove()));
- m_d->layout->addLayout(fe.layout);
- m_d->fieldEntries.push_back(fe);
+ d->layout->addLayout(fe.layout);
+ d->fieldEntries.push_back(fe);
}
void SubmitFieldWidget::slotRemove()
{
// Never remove first entry
- const int index = m_d->findSender(sender());
+ const int index = d->findSender(sender());
switch (index) {
case -1:
break;
case 0:
- m_d->fieldEntries.front().lineEdit->clear();
+ d->fieldEntries.front().lineEdit->clear();
break;
default:
removeField(index);
@@ -332,25 +332,25 @@ void SubmitFieldWidget::slotRemove()
void SubmitFieldWidget::removeField(int index)
{
- FieldEntry fe = m_d->fieldEntries.takeAt(index);
- QLayoutItem * item = m_d->layout->takeAt(index);
+ FieldEntry fe = d->fieldEntries.takeAt(index);
+ QLayoutItem * item = d->layout->takeAt(index);
fe.deleteGuiLater();
delete item;
}
void SubmitFieldWidget::slotComboIndexChanged(int comboIndex)
{
- const int pos = m_d->findSender(sender());
+ const int pos = d->findSender(sender());
if (debug)
qDebug() << '>' << Q_FUNC_INFO << pos;
if (pos == -1)
return;
// Accept new index or reset combo to previous value?
- int &previousIndex = m_d->fieldEntries[pos].comboIndex;
+ int &previousIndex = d->fieldEntries[pos].comboIndex;
if (comboIndexChange(pos, comboIndex)) {
previousIndex = comboIndex;
} else {
- setComboBlocked(m_d->fieldEntries.at(pos).combo, previousIndex);
+ setComboBlocked(d->fieldEntries.at(pos).combo, previousIndex);
}
if (debug)
qDebug() << '<' << Q_FUNC_INFO << pos;
@@ -360,17 +360,17 @@ void SubmitFieldWidget::slotComboIndexChanged(int comboIndex)
// is to be reset (refuse new field).
bool SubmitFieldWidget::comboIndexChange(int pos, int index)
{
- const QString newField = m_d->fieldEntries.at(pos).combo->itemText(index);
+ const QString newField = d->fieldEntries.at(pos).combo->itemText(index);
// If the field is visible elsewhere: focus the existing one and refuse
- if (!m_d->allowDuplicateFields) {
- const int existingFieldIndex = m_d->findField(newField, pos);
+ if (!d->allowDuplicateFields) {
+ const int existingFieldIndex = d->findField(newField, pos);
if (existingFieldIndex != -1) {
- m_d->focusField(existingFieldIndex);
+ d->focusField(existingFieldIndex);
return false;
}
}
// Empty value: just change the field
- if (m_d->fieldValue(pos).isEmpty())
+ if (d->fieldValue(pos).isEmpty())
return true;
// Non-empty: Create a new field and reset the triggering combo
createField(newField);
@@ -379,8 +379,8 @@ bool SubmitFieldWidget::comboIndexChange(int pos, int index)
void SubmitFieldWidget::slotBrowseButtonClicked()
{
- const int pos = m_d->findSender(sender());
- emit browseButtonClicked(pos, m_d->fieldText(pos));
+ const int pos = d->findSender(sender());
+ emit browseButtonClicked(pos, d->fieldText(pos));
}
}
diff --git a/src/libs/utils/submitfieldwidget.h b/src/libs/utils/submitfieldwidget.h
index 1d2e01cd3f..eb5e9b609a 100644
--- a/src/libs/utils/submitfieldwidget.h
+++ b/src/libs/utils/submitfieldwidget.h
@@ -87,9 +87,9 @@ private:
bool comboIndexChange(int fieldNumber, int index);
void createField(const QString &f);
- SubmitFieldWidgetPrivate *m_d;
+ SubmitFieldWidgetPrivate *d;
};
-}
+} // namespace Utils
#endif // SUBMITFIELDWIDGET_H
diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp
index c7768a6c6f..dad4079b74 100644
--- a/src/libs/utils/synchronousprocess.cpp
+++ b/src/libs/utils/synchronousprocess.cpp
@@ -237,127 +237,127 @@ void SynchronousProcessPrivate::clearForRun()
// ----------- SynchronousProcess
SynchronousProcess::SynchronousProcess() :
- m_d(new SynchronousProcessPrivate)
+ d(new SynchronousProcessPrivate)
{
- m_d->m_timer.setInterval(1000);
- connect(&m_d->m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
- connect(&m_d->m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(finished(int,QProcess::ExitStatus)));
- connect(&m_d->m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(error(QProcess::ProcessError)));
- connect(&m_d->m_process, SIGNAL(readyReadStandardOutput()),
+ d->m_timer.setInterval(1000);
+ connect(&d->m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(&d->m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(finished(int,QProcess::ExitStatus)));
+ connect(&d->m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(error(QProcess::ProcessError)));
+ connect(&d->m_process, SIGNAL(readyReadStandardOutput()),
this, SLOT(stdOutReady()));
- connect(&m_d->m_process, SIGNAL(readyReadStandardError()),
+ connect(&d->m_process, SIGNAL(readyReadStandardError()),
this, SLOT(stdErrReady()));
}
SynchronousProcess::~SynchronousProcess()
{
- disconnect(&m_d->m_timer, 0, this, 0);
- disconnect(&m_d->m_process, 0, this, 0);
- delete m_d;
+ disconnect(&d->m_timer, 0, this, 0);
+ disconnect(&d->m_process, 0, this, 0);
+ delete d;
}
void SynchronousProcess::setTimeout(int timeoutMS)
{
if (timeoutMS >= 0) {
- m_d->m_maxHangTimerCount = qMax(2, timeoutMS / 1000);
+ d->m_maxHangTimerCount = qMax(2, timeoutMS / 1000);
} else {
- m_d->m_maxHangTimerCount = INT_MAX;
+ d->m_maxHangTimerCount = INT_MAX;
}
}
int SynchronousProcess::timeout() const
{
- return m_d->m_maxHangTimerCount == INT_MAX ? -1 : 1000 * m_d->m_maxHangTimerCount;
+ return d->m_maxHangTimerCount == INT_MAX ? -1 : 1000 * d->m_maxHangTimerCount;
}
void SynchronousProcess::setStdOutCodec(QTextCodec *c)
{
- m_d->m_stdOutCodec = c;
+ d->m_stdOutCodec = c;
}
QTextCodec *SynchronousProcess::stdOutCodec() const
{
- return m_d->m_stdOutCodec;
+ return d->m_stdOutCodec;
}
bool SynchronousProcess::stdOutBufferedSignalsEnabled() const
{
- return m_d->m_stdOut.bufferedSignalsEnabled;
+ return d->m_stdOut.bufferedSignalsEnabled;
}
void SynchronousProcess::setStdOutBufferedSignalsEnabled(bool v)
{
- m_d->m_stdOut.bufferedSignalsEnabled = v;
+ d->m_stdOut.bufferedSignalsEnabled = v;
}
bool SynchronousProcess::stdErrBufferedSignalsEnabled() const
{
- return m_d->m_stdErr.bufferedSignalsEnabled;
+ return d->m_stdErr.bufferedSignalsEnabled;
}
void SynchronousProcess::setStdErrBufferedSignalsEnabled(bool v)
{
- m_d->m_stdErr.bufferedSignalsEnabled = v;
+ d->m_stdErr.bufferedSignalsEnabled = v;
}
QStringList SynchronousProcess::environment() const
{
- return m_d->m_process.environment();
+ return d->m_process.environment();
}
bool SynchronousProcess::timeOutMessageBoxEnabled() const
{
- return m_d->m_timeOutMessageBoxEnabled;
+ return d->m_timeOutMessageBoxEnabled;
}
void SynchronousProcess::setTimeOutMessageBoxEnabled(bool v)
{
- m_d->m_timeOutMessageBoxEnabled = v;
+ d->m_timeOutMessageBoxEnabled = v;
}
void SynchronousProcess::setEnvironment(const QStringList &e)
{
- m_d->m_process.setEnvironment(e);
+ d->m_process.setEnvironment(e);
}
void SynchronousProcess::setProcessEnvironment(const QProcessEnvironment &environment)
{
- m_d->m_process.setProcessEnvironment(environment);
+ d->m_process.setProcessEnvironment(environment);
}
QProcessEnvironment SynchronousProcess::processEnvironment() const
{
- return m_d->m_process.processEnvironment();
+ return d->m_process.processEnvironment();
}
unsigned SynchronousProcess::flags() const
{
- return m_d->m_process.flags();
+ return d->m_process.flags();
}
void SynchronousProcess::setFlags(unsigned tc)
{
- m_d->m_process.setFlags(tc);
+ d->m_process.setFlags(tc);
}
void SynchronousProcess::setWorkingDirectory(const QString &workingDirectory)
{
- m_d->m_process.setWorkingDirectory(workingDirectory);
+ d->m_process.setWorkingDirectory(workingDirectory);
}
QString SynchronousProcess::workingDirectory() const
{
- return m_d->m_process.workingDirectory();
+ return d->m_process.workingDirectory();
}
QProcess::ProcessChannelMode SynchronousProcess::processChannelMode () const
{
- return m_d->m_process.processChannelMode();
+ return d->m_process.processChannelMode();
}
void SynchronousProcess::setProcessChannelMode(QProcess::ProcessChannelMode m)
{
- m_d->m_process.setProcessChannelMode(m);
+ d->m_process.setProcessChannelMode(m);
}
SynchronousProcessResponse SynchronousProcess::run(const QString &binary,
@@ -366,33 +366,33 @@ SynchronousProcessResponse SynchronousProcess::run(const QString &binary,
if (debug)
qDebug() << '>' << Q_FUNC_INFO << binary << args;
- m_d->clearForRun();
+ d->clearForRun();
// On Windows, start failure is triggered immediately if the
// executable cannot be found in the path. Do not start the
// event loop in that case.
- m_d->m_binary = binary;
- m_d->m_process.start(binary, args, QIODevice::ReadOnly);
- m_d->m_process.closeWriteChannel();
- if (!m_d->m_startFailure) {
- m_d->m_timer.start();
+ d->m_binary = binary;
+ d->m_process.start(binary, args, QIODevice::ReadOnly);
+ d->m_process.closeWriteChannel();
+ if (!d->m_startFailure) {
+ d->m_timer.start();
QApplication::setOverrideCursor(Qt::WaitCursor);
- m_d->m_eventLoop.exec(QEventLoop::ExcludeUserInputEvents);
- if (m_d->m_result.result == SynchronousProcessResponse::Finished || m_d->m_result.result == SynchronousProcessResponse::FinishedError) {
+ d->m_eventLoop.exec(QEventLoop::ExcludeUserInputEvents);
+ if (d->m_result.result == SynchronousProcessResponse::Finished || d->m_result.result == SynchronousProcessResponse::FinishedError) {
processStdOut(false);
processStdErr(false);
}
- m_d->m_result.stdOut = convertStdOut(m_d->m_stdOut.data);
- m_d->m_result.stdErr = convertStdErr(m_d->m_stdErr.data);
+ d->m_result.stdOut = convertStdOut(d->m_stdOut.data);
+ d->m_result.stdErr = convertStdErr(d->m_stdErr.data);
- m_d->m_timer.stop();
+ d->m_timer.stop();
QApplication::restoreOverrideCursor();
}
if (debug)
- qDebug() << '<' << Q_FUNC_INFO << binary << m_d->m_result;
- return m_d->m_result;
+ qDebug() << '<' << Q_FUNC_INFO << binary << d->m_result;
+ return d->m_result;
}
static inline bool askToKill(const QString &binary = QString())
@@ -415,19 +415,19 @@ static inline bool askToKill(const QString &binary = QString())
void SynchronousProcess::slotTimeout()
{
- if (++m_d->m_hangTimerCount > m_d->m_maxHangTimerCount) {
+ if (++d->m_hangTimerCount > d->m_maxHangTimerCount) {
if (debug)
qDebug() << Q_FUNC_INFO << "HANG detected, killing";
- const bool terminate = !m_d->m_timeOutMessageBoxEnabled || askToKill(m_d->m_binary);
+ const bool terminate = !d->m_timeOutMessageBoxEnabled || askToKill(d->m_binary);
if (terminate) {
- SynchronousProcess::stopProcess(m_d->m_process);
- m_d->m_result.result = SynchronousProcessResponse::Hang;
+ SynchronousProcess::stopProcess(d->m_process);
+ d->m_result.result = SynchronousProcessResponse::Hang;
} else {
- m_d->m_hangTimerCount = 0;
+ d->m_hangTimerCount = 0;
}
} else {
if (debug)
- qDebug() << Q_FUNC_INFO << m_d->m_hangTimerCount;
+ qDebug() << Q_FUNC_INFO << d->m_hangTimerCount;
}
}
@@ -435,43 +435,43 @@ void SynchronousProcess::finished(int exitCode, QProcess::ExitStatus e)
{
if (debug)
qDebug() << Q_FUNC_INFO << exitCode << e;
- m_d->m_hangTimerCount = 0;
+ d->m_hangTimerCount = 0;
switch (e) {
case QProcess::NormalExit:
- m_d->m_result.result = exitCode ? SynchronousProcessResponse::FinishedError : SynchronousProcessResponse::Finished;
- m_d->m_result.exitCode = exitCode;
+ d->m_result.result = exitCode ? SynchronousProcessResponse::FinishedError : SynchronousProcessResponse::Finished;
+ d->m_result.exitCode = exitCode;
break;
case QProcess::CrashExit:
// Was hang detected before and killed?
- if (m_d->m_result.result != SynchronousProcessResponse::Hang)
- m_d->m_result.result = SynchronousProcessResponse::TerminatedAbnormally;
- m_d->m_result.exitCode = -1;
+ if (d->m_result.result != SynchronousProcessResponse::Hang)
+ d->m_result.result = SynchronousProcessResponse::TerminatedAbnormally;
+ d->m_result.exitCode = -1;
break;
}
- m_d->m_eventLoop.quit();
+ d->m_eventLoop.quit();
}
void SynchronousProcess::error(QProcess::ProcessError e)
{
- m_d->m_hangTimerCount = 0;
+ d->m_hangTimerCount = 0;
if (debug)
qDebug() << Q_FUNC_INFO << e;
// Was hang detected before and killed?
- if (m_d->m_result.result != SynchronousProcessResponse::Hang)
- m_d->m_result.result = SynchronousProcessResponse::StartFailed;
- m_d->m_startFailure = true;
- m_d->m_eventLoop.quit();
+ if (d->m_result.result != SynchronousProcessResponse::Hang)
+ d->m_result.result = SynchronousProcessResponse::StartFailed;
+ d->m_startFailure = true;
+ d->m_eventLoop.quit();
}
void SynchronousProcess::stdOutReady()
{
- m_d->m_hangTimerCount = 0;
+ d->m_hangTimerCount = 0;
processStdOut(true);
}
void SynchronousProcess::stdErrReady()
{
- m_d->m_hangTimerCount = 0;
+ d->m_hangTimerCount = 0;
processStdErr(true);
}
@@ -482,28 +482,28 @@ QString SynchronousProcess::convertStdErr(const QByteArray &ba)
QString SynchronousProcess::convertStdOut(const QByteArray &ba) const
{
- QString stdOut = m_d->m_stdOutCodec ? m_d->m_stdOutCodec->toUnicode(ba) : QString::fromLocal8Bit(ba.constData(), ba.size());
+ QString stdOut = d->m_stdOutCodec ? d->m_stdOutCodec->toUnicode(ba) : QString::fromLocal8Bit(ba.constData(), ba.size());
return stdOut.remove(QLatin1Char('\r'));
}
void SynchronousProcess::processStdOut(bool emitSignals)
{
// Handle binary data
- const QByteArray ba = m_d->m_process.readAllStandardOutput();
+ const QByteArray ba = d->m_process.readAllStandardOutput();
if (debug > 1)
qDebug() << Q_FUNC_INFO << emitSignals << ba;
if (!ba.isEmpty()) {
- m_d->m_stdOut.data += ba;
+ d->m_stdOut.data += ba;
if (emitSignals) {
// Emit binary signals
- emit stdOut(ba, m_d->m_stdOut.firstData);
- m_d->m_stdOut.firstData = false;
+ emit stdOut(ba, d->m_stdOut.firstData);
+ d->m_stdOut.firstData = false;
// Buffered. Emit complete lines?
- if (m_d->m_stdOut.bufferedSignalsEnabled) {
- const QByteArray lines = m_d->m_stdOut.linesRead();
+ if (d->m_stdOut.bufferedSignalsEnabled) {
+ const QByteArray lines = d->m_stdOut.linesRead();
if (!lines.isEmpty()) {
- emit stdOutBuffered(convertStdOut(lines), m_d->m_stdOut.firstBuffer);
- m_d->m_stdOut.firstBuffer = false;
+ emit stdOutBuffered(convertStdOut(lines), d->m_stdOut.firstBuffer);
+ d->m_stdOut.firstBuffer = false;
}
}
}
@@ -513,21 +513,21 @@ void SynchronousProcess::processStdOut(bool emitSignals)
void SynchronousProcess::processStdErr(bool emitSignals)
{
// Handle binary data
- const QByteArray ba = m_d->m_process.readAllStandardError();
+ const QByteArray ba = d->m_process.readAllStandardError();
if (debug > 1)
qDebug() << Q_FUNC_INFO << emitSignals << ba;
if (!ba.isEmpty()) {
- m_d->m_stdErr.data += ba;
+ d->m_stdErr.data += ba;
if (emitSignals) {
// Emit binary signals
- emit stdErr(ba, m_d->m_stdErr.firstData);
- m_d->m_stdErr.firstData = false;
- if (m_d->m_stdErr.bufferedSignalsEnabled) {
+ emit stdErr(ba, d->m_stdErr.firstData);
+ d->m_stdErr.firstData = false;
+ if (d->m_stdErr.bufferedSignalsEnabled) {
// Buffered. Emit complete lines?
- const QByteArray lines = m_d->m_stdErr.linesRead();
+ const QByteArray lines = d->m_stdErr.linesRead();
if (!lines.isEmpty()) {
- emit stdErrBuffered(convertStdErr(lines), m_d->m_stdErr.firstBuffer);
- m_d->m_stdErr.firstBuffer = false;
+ emit stdErrBuffered(convertStdErr(lines), d->m_stdErr.firstBuffer);
+ d->m_stdErr.firstBuffer = false;
}
}
}
diff --git a/src/libs/utils/synchronousprocess.h b/src/libs/utils/synchronousprocess.h
index 8520a3fe19..6c9173c1f0 100644
--- a/src/libs/utils/synchronousprocess.h
+++ b/src/libs/utils/synchronousprocess.h
@@ -43,7 +43,6 @@
QT_BEGIN_NAMESPACE
class QTextCodec;
class QDebug;
-class QByteArray;
QT_END_NAMESPACE
namespace Utils {
@@ -165,7 +164,7 @@ private:
static QString convertStdErr(const QByteArray &);
QString convertStdOut(const QByteArray &) const;
- SynchronousProcessPrivate *m_d;
+ SynchronousProcessPrivate *d;
};
} // namespace Utils
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp
index 1b46d1c28a..dedef3247f 100644
--- a/src/plugins/coreplugin/vcsmanager.cpp
+++ b/src/plugins/coreplugin/vcsmanager.cpp
@@ -140,7 +140,7 @@ public:
VcsManager::VcsManager(QObject *parent) :
QObject(parent),
- m_d(new VcsManagerPrivate)
+ d(new VcsManagerPrivate)
{
}
@@ -148,7 +148,7 @@ VcsManager::VcsManager(QObject *parent) :
VcsManager::~VcsManager()
{
- delete m_d;
+ delete d;
}
void VcsManager::extensionsInitialized()
@@ -177,7 +177,7 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
// Make sure we a clean absolute path:
const QString directory = QDir(inputDirectory).absolutePath();
- VcsManagerPrivate::VcsInfo *cachedData = m_d->findInCache(directory);
+ VcsManagerPrivate::VcsInfo *cachedData = d->findInCache(directory);
if (cachedData) {
if (topLevelDirectory)
*topLevelDirectory = cachedData->topLevel;
@@ -199,7 +199,7 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
qSort(allThatCanManage.begin(), allThatCanManage.end(), longerThanPath);
if (allThatCanManage.isEmpty()) {
- m_d->cache(0, QString(), directory); // register that nothing was found!
+ d->cache(0, QString(), directory); // register that nothing was found!
// report result;
if (topLevelDirectory)
@@ -211,7 +211,7 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
QString tmpDir = directory;
for (QList<QPair<QString, IVersionControl *> >::const_iterator i = allThatCanManage.constBegin();
i != allThatCanManage.constEnd(); ++i) {
- m_d->cache(i->second, i->first, tmpDir);
+ d->cache(i->second, i->first, tmpDir);
tmpDir = i->first;
tmpDir = tmpDir.left(tmpDir.lastIndexOf(SLASH));
}
@@ -237,7 +237,7 @@ IVersionControl *VcsManager::checkout(const QString &versionControlType,
if (versionControl->displayName() == versionControlType
&& versionControl->supportsOperation(Core::IVersionControl::CheckoutOperation)) {
if (versionControl->vcsCheckout(directory, url)) {
- m_d->cache(versionControl, directory, directory);
+ d->cache(versionControl, directory, directory);
return versionControl;
}
return 0;
diff --git a/src/plugins/coreplugin/vcsmanager.h b/src/plugins/coreplugin/vcsmanager.h
index d1fc687adb..ca47e77d1a 100644
--- a/src/plugins/coreplugin/vcsmanager.h
+++ b/src/plugins/coreplugin/vcsmanager.h
@@ -38,10 +38,6 @@
#include <QtCore/QString>
#include <QtCore/QObject>
-QT_BEGIN_NAMESPACE
-class QDebug;
-QT_END_NAMESPACE
-
namespace Core {
class VcsManagerPrivate;
@@ -62,6 +58,7 @@ class IVersionControl;
class CORE_EXPORT VcsManager : public QObject
{
Q_OBJECT
+
public:
explicit VcsManager(QObject *parent = 0);
virtual ~VcsManager();
@@ -88,7 +85,7 @@ signals:
void repositoryChanged(const QString &repository);
private:
- VcsManagerPrivate *m_d;
+ VcsManagerPrivate *d;
};
} // namespace Core
diff --git a/src/plugins/cpptools/cpptoolssettings.cpp b/src/plugins/cpptools/cpptoolssettings.cpp
index 4160801161..957a2d9c18 100644
--- a/src/plugins/cpptools/cpptoolssettings.cpp
+++ b/src/plugins/cpptools/cpptoolssettings.cpp
@@ -62,7 +62,7 @@ CppToolsSettings *CppToolsSettings::m_instance = 0;
CppToolsSettings::CppToolsSettings(QObject *parent)
: QObject(parent)
- , m_d(new Internal::CppToolsSettingsPrivate)
+ , d(new Internal::CppToolsSettingsPrivate)
{
QTC_ASSERT(!m_instance, return);
m_instance = this;
@@ -70,28 +70,28 @@ CppToolsSettings::CppToolsSettings(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(CppTools::Constants::CPP_SETTINGS_ID, s);
- m_d->m_tabPreferences->setDisplayName(tr("Global C++", "Settings"));
- m_d->m_tabPreferences->setId(idKey);
- textEditorSettings->registerLanguageTabPreferences(CppTools::Constants::CPP_SETTINGS_ID, m_d->m_tabPreferences);
-
- m_d->m_cppCodeStylePreferences
+ d->m_tabPreferences->setCurrentFallback(tabPrefs);
+ d->m_tabPreferences->setFallbackEnabled(tabPrefs, false);
+ d->m_tabPreferences->fromSettings(CppTools::Constants::CPP_SETTINGS_ID, s);
+ d->m_tabPreferences->setDisplayName(tr("Global C++", "Settings"));
+ d->m_tabPreferences->setId(idKey);
+ textEditorSettings->registerLanguageTabPreferences(CppTools::Constants::CPP_SETTINGS_ID, d->m_tabPreferences);
+
+ d->m_cppCodeStylePreferences
= new CppCodeStylePreferences(QList<TextEditor::IFallbackPreferences *>(), this);
- m_d->m_cppCodeStylePreferences->fromSettings(CppTools::Constants::CPP_SETTINGS_ID, s);
- m_d->m_cppCodeStylePreferences->setDisplayName(tr("Global C++", "Settings"));
- m_d->m_cppCodeStylePreferences->setId(idKey);
- textEditorSettings->registerLanguageCodeStylePreferences(CppTools::Constants::CPP_SETTINGS_ID, m_d->m_cppCodeStylePreferences);
+ d->m_cppCodeStylePreferences->fromSettings(CppTools::Constants::CPP_SETTINGS_ID, s);
+ d->m_cppCodeStylePreferences->setDisplayName(tr("Global C++", "Settings"));
+ d->m_cppCodeStylePreferences->setId(idKey);
+ textEditorSettings->registerLanguageCodeStylePreferences(CppTools::Constants::CPP_SETTINGS_ID, d->m_cppCodeStylePreferences);
}
}
CppToolsSettings::~CppToolsSettings()
{
- delete m_d;
+ delete d;
m_instance = 0;
}
@@ -103,12 +103,12 @@ CppToolsSettings *CppToolsSettings::instance()
CppCodeStylePreferences *CppToolsSettings::cppCodeStylePreferences() const
{
- return m_d->m_cppCodeStylePreferences;
+ return d->m_cppCodeStylePreferences;
}
TextEditor::TabPreferences *CppToolsSettings::tabPreferences() const
{
- return m_d->m_tabPreferences;
+ return d->m_tabPreferences;
}
diff --git a/src/plugins/cpptools/cpptoolssettings.h b/src/plugins/cpptools/cpptoolssettings.h
index cc0004bd7d..8b9cbb5cba 100644
--- a/src/plugins/cpptools/cpptoolssettings.h
+++ b/src/plugins/cpptools/cpptoolssettings.h
@@ -69,7 +69,7 @@ public:
TextEditor::TabPreferences *tabPreferences() const;
private:
- Internal::CppToolsSettingsPrivate *m_d;
+ Internal::CppToolsSettingsPrivate *d;
static CppToolsSettings *m_instance;
};
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index d0a2754a58..e32ba085b9 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -73,46 +73,46 @@ public:
// --------------------------------------------------------------------------
ToolChain::ToolChain(const QString &id, bool autodetect) :
- m_d(new Internal::ToolChainPrivate(id, autodetect))
+ d(new Internal::ToolChainPrivate(id, autodetect))
{ }
ToolChain::ToolChain(const ToolChain &other) :
- m_d(new Internal::ToolChainPrivate(other.id(), false))
+ d(new Internal::ToolChainPrivate(other.id(), false))
{
// leave the autodetection bit at false.
- m_d->m_displayName = QCoreApplication::translate("ProjectExplorer::ToolChain", "Clone of %1")
+ d->m_displayName = QCoreApplication::translate("ProjectExplorer::ToolChain", "Clone of %1")
.arg(other.displayName());
}
ToolChain::~ToolChain()
{
- delete m_d;
+ delete d;
}
QString ToolChain::displayName() const
{
- if (m_d->m_displayName.isEmpty())
+ if (d->m_displayName.isEmpty())
return typeName();
- return m_d->m_displayName;
+ return d->m_displayName;
}
void ToolChain::setDisplayName(const QString &name)
{
- if (m_d->m_displayName == name)
+ if (d->m_displayName == name)
return;
- m_d->m_displayName = name;
+ d->m_displayName = name;
toolChainUpdated();
}
bool ToolChain::isAutoDetected() const
{
- return m_d->m_autodetect;
+ return d->m_autodetect;
}
QString ToolChain::id() const
{
- return m_d->m_id;
+ return d->m_id;
}
/*!
@@ -165,10 +165,10 @@ QVariantMap ToolChain::toMap() const
void ToolChain::setId(const QString &id)
{
Q_ASSERT(!id.isEmpty());
- if (m_d->m_id == id)
+ if (d->m_id == id)
return;
- m_d->m_id = id;
+ d->m_id = id;
toolChainUpdated();
}
@@ -179,9 +179,9 @@ void ToolChain::toolChainUpdated()
void ToolChain::setAutoDetected(bool autodetect)
{
- if (m_d->m_autodetect == autodetect)
+ if (d->m_autodetect == autodetect)
return;
- m_d->m_autodetect = autodetect;
+ d->m_autodetect = autodetect;
toolChainUpdated();
}
@@ -195,7 +195,7 @@ bool ToolChain::fromMap(const QVariantMap &data)
{
Q_ASSERT(!isAutoDetected());
// do not read the id: That is already set anyway.
- m_d->m_displayName = data.value(QLatin1String(DISPLAY_NAME_KEY)).toString();
+ d->m_displayName = data.value(QLatin1String(DISPLAY_NAME_KEY)).toString();
return true;
}
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index 7d0f2eefd8..c83c35e4fe 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -113,7 +113,7 @@ protected:
private:
void setAutoDetected(bool);
- Internal::ToolChainPrivate *const m_d;
+ Internal::ToolChainPrivate *const d;
friend class ToolChainManager;
friend class ToolChainFactory;
diff --git a/src/plugins/vcsbase/baseannotationhighlighter.cpp b/src/plugins/vcsbase/baseannotationhighlighter.cpp
index 7856fc1542..486db8bea7 100644
--- a/src/plugins/vcsbase/baseannotationhighlighter.cpp
+++ b/src/plugins/vcsbase/baseannotationhighlighter.cpp
@@ -64,19 +64,19 @@ struct BaseAnnotationHighlighterPrivate {
BaseAnnotationHighlighter::BaseAnnotationHighlighter(const ChangeNumbers &changeNumbers,
QTextDocument *document) :
TextEditor::SyntaxHighlighter(document),
- m_d(new BaseAnnotationHighlighterPrivate)
+ d(new BaseAnnotationHighlighterPrivate)
{
setChangeNumbers(changeNumbers);
}
BaseAnnotationHighlighter::~BaseAnnotationHighlighter()
{
- delete m_d;
+ delete d;
}
void BaseAnnotationHighlighter::setChangeNumbers(const ChangeNumbers &changeNumbers)
{
- m_d->m_changeNumberMap.clear();
+ d->m_changeNumberMap.clear();
if (!changeNumbers.isEmpty()) {
// Assign a color gradient to annotation change numbers. Give
// each change number a unique color.
@@ -95,7 +95,7 @@ void BaseAnnotationHighlighter::setChangeNumbers(const ChangeNumbers &changeNumb
for (ChangeNumbers::const_iterator it = changeNumbers.constBegin(); it != cend; ++it) {
QTextCharFormat format;
format.setForeground(colors.at(m));
- m_d->m_changeNumberMap.insert(*it, format);
+ d->m_changeNumberMap.insert(*it, format);
m += cstep;
}
}
@@ -103,11 +103,11 @@ void BaseAnnotationHighlighter::setChangeNumbers(const ChangeNumbers &changeNumb
void BaseAnnotationHighlighter::highlightBlock(const QString &text)
{
- if (text.isEmpty() || m_d->m_changeNumberMap.empty())
+ if (text.isEmpty() || d->m_changeNumberMap.empty())
return;
const QString change = changeNumber(text);
- const ChangeNumberFormatMap::const_iterator it = m_d->m_changeNumberMap.constFind(change);
- if (it != m_d->m_changeNumberMap.constEnd())
+ const ChangeNumberFormatMap::const_iterator it = d->m_changeNumberMap.constFind(change);
+ if (it != d->m_changeNumberMap.constEnd())
setFormat(0, text.length(), it.value());
}
diff --git a/src/plugins/vcsbase/baseannotationhighlighter.h b/src/plugins/vcsbase/baseannotationhighlighter.h
index 65723c4828..34214d6092 100644
--- a/src/plugins/vcsbase/baseannotationhighlighter.h
+++ b/src/plugins/vcsbase/baseannotationhighlighter.h
@@ -59,7 +59,7 @@ private:
// Implement this to return the change number of a line
virtual QString changeNumber(const QString &block) const = 0;
- BaseAnnotationHighlighterPrivate *m_d;
+ BaseAnnotationHighlighterPrivate *d;
};
} // namespace VCSBase
diff --git a/src/plugins/vcsbase/vcsconfigurationpage.cpp b/src/plugins/vcsbase/vcsconfigurationpage.cpp
index fbba05f0f3..6fec7ee7ac 100644
--- a/src/plugins/vcsbase/vcsconfigurationpage.cpp
+++ b/src/plugins/vcsbase/vcsconfigurationpage.cpp
@@ -60,37 +60,37 @@ public:
VcsConfigurationPage::VcsConfigurationPage(const Core::IVersionControl *vc, QWidget *parent) :
QWizardPage(parent),
- m_d(new VcsConfigurationPagePrivate)
+ d(new VcsConfigurationPagePrivate)
{
Q_ASSERT(vc);
setTitle(tr("Configuration"));
setSubTitle(tr("Please configure <b>%1</b> now.").arg(vc->displayName()));
- m_d->m_versionControl = vc;
+ d->m_versionControl = vc;
- connect(m_d->m_versionControl, SIGNAL(configurationChanged()),
+ connect(d->m_versionControl, SIGNAL(configurationChanged()),
this, SIGNAL(completeChanged()));
- m_d->m_ui->setupUi(this);
+ d->m_ui->setupUi(this);
- connect(m_d->m_ui->configureButton, SIGNAL(clicked()),
+ connect(d->m_ui->configureButton, SIGNAL(clicked()),
this, SLOT(openConfiguration()));
}
VcsConfigurationPage::~VcsConfigurationPage()
{
- delete m_d->m_ui;
+ delete d->m_ui;
}
bool VcsConfigurationPage::isComplete() const
{
- return m_d->m_versionControl->isConfigured();
+ return d->m_versionControl->isConfigured();
}
void VcsConfigurationPage::openConfiguration()
{
Core::ICore *core = Core::ICore::instance();
- core->showOptionsDialog(VCSBase::Constants::VCS_SETTINGS_CATEGORY, m_d->m_versionControl->id());
+ core->showOptionsDialog(VCSBase::Constants::VCS_SETTINGS_CATEGORY, d->m_versionControl->id());
}
} // namespace VCSBase
diff --git a/src/plugins/vcsbase/vcsconfigurationpage.h b/src/plugins/vcsbase/vcsconfigurationpage.h
index 53d8b60eba..55cd4a7a05 100644
--- a/src/plugins/vcsbase/vcsconfigurationpage.h
+++ b/src/plugins/vcsbase/vcsconfigurationpage.h
@@ -57,7 +57,7 @@ public:
private slots:
void openConfiguration();
private:
- VcsConfigurationPagePrivate *const m_d;
+ VcsConfigurationPagePrivate *const d;
};
} // namespace VCSBase