forked from qt-creator/qt-creator
utils, qmljstools, vcsbase: s/\bm_d\b/d/g
Change-Id: I4678e9188b8f630aa3a3221be348984cdc7699dd Reviewed-on: http://codereview.qt-project.org/4992 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -155,7 +155,7 @@ QVariant EnvironmentModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
}
|
||||
if (role == Qt::FontRole) {
|
||||
// check whether this environment variable exists in m_d->m_items
|
||||
// check whether this environment variable exists in d->m_items
|
||||
if (changes(d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row()))) {
|
||||
QFont f;
|
||||
f.setBold(true);
|
||||
@@ -320,7 +320,7 @@ void EnvironmentModel::unsetVariable(const QString &name)
|
||||
if (row < 0)
|
||||
return;
|
||||
|
||||
// look in m_d->m_items for the variable
|
||||
// look in d->m_items for the variable
|
||||
int pos = d->findInChanges(name);
|
||||
if (pos != -1) {
|
||||
d->m_items[pos].unset = true;
|
||||
|
||||
@@ -125,22 +125,22 @@ bool FancyLineEditPrivate::eventFilter(QObject *obj, QEvent *event)
|
||||
// --------- FancyLineEdit
|
||||
FancyLineEdit::FancyLineEdit(QWidget *parent) :
|
||||
QLineEdit(parent),
|
||||
m_d(new FancyLineEditPrivate(this))
|
||||
d(new FancyLineEditPrivate(this))
|
||||
{
|
||||
ensurePolished();
|
||||
updateMargins();
|
||||
|
||||
connect(this, SIGNAL(textChanged(QString)), this, SLOT(checkButtons(QString)));
|
||||
connect(m_d->m_iconbutton[Left], SIGNAL(clicked()), this, SLOT(iconClicked()));
|
||||
connect(m_d->m_iconbutton[Right], SIGNAL(clicked()), this, SLOT(iconClicked()));
|
||||
connect(d->m_iconbutton[Left], SIGNAL(clicked()), this, SLOT(iconClicked()));
|
||||
connect(d->m_iconbutton[Right], SIGNAL(clicked()), this, SLOT(iconClicked()));
|
||||
}
|
||||
|
||||
void FancyLineEdit::checkButtons(const QString &text)
|
||||
{
|
||||
if (m_oldText.isEmpty() || text.isEmpty()) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
if (m_d->m_iconbutton[i]->hasAutoHide())
|
||||
m_d->m_iconbutton[i]->animateShow(!text.isEmpty());
|
||||
if (d->m_iconbutton[i]->hasAutoHide())
|
||||
d->m_iconbutton[i]->animateShow(!text.isEmpty());
|
||||
}
|
||||
m_oldText = text;
|
||||
}
|
||||
@@ -152,14 +152,14 @@ FancyLineEdit::~FancyLineEdit()
|
||||
|
||||
void FancyLineEdit::setButtonVisible(Side side, bool visible)
|
||||
{
|
||||
m_d->m_iconbutton[side]->setVisible(visible);
|
||||
m_d->m_iconEnabled[side] = visible;
|
||||
d->m_iconbutton[side]->setVisible(visible);
|
||||
d->m_iconEnabled[side] = visible;
|
||||
updateMargins();
|
||||
}
|
||||
|
||||
bool FancyLineEdit::isButtonVisible(Side side) const
|
||||
{
|
||||
return m_d->m_iconEnabled[side];
|
||||
return d->m_iconEnabled[side];
|
||||
}
|
||||
|
||||
void FancyLineEdit::iconClicked()
|
||||
@@ -167,12 +167,12 @@ void FancyLineEdit::iconClicked()
|
||||
IconButton *button = qobject_cast<IconButton *>(sender());
|
||||
int index = -1;
|
||||
for (int i = 0; i < 2; ++i)
|
||||
if (m_d->m_iconbutton[i] == button)
|
||||
if (d->m_iconbutton[i] == button)
|
||||
index = i;
|
||||
if (index == -1)
|
||||
return;
|
||||
if (m_d->m_menu[index]) {
|
||||
m_d->m_menu[index]->exec(QCursor::pos());
|
||||
if (d->m_menu[index]) {
|
||||
d->m_menu[index]->exec(QCursor::pos());
|
||||
} else {
|
||||
emit buttonClicked((Side)index);
|
||||
if (index == Left)
|
||||
@@ -188,16 +188,16 @@ void FancyLineEdit::updateMargins()
|
||||
Side realLeft = (leftToRight ? Left : Right);
|
||||
Side realRight = (leftToRight ? Right : Left);
|
||||
|
||||
int leftMargin = m_d->m_iconbutton[realLeft]->pixmap().width() + 8;
|
||||
int rightMargin = m_d->m_iconbutton[realRight]->pixmap().width() + 8;
|
||||
int leftMargin = d->m_iconbutton[realLeft]->pixmap().width() + 8;
|
||||
int rightMargin = d->m_iconbutton[realRight]->pixmap().width() + 8;
|
||||
// Note KDE does not reserve space for the highlight color
|
||||
if (style()->inherits("OxygenStyle")) {
|
||||
leftMargin = qMax(24, leftMargin);
|
||||
rightMargin = qMax(24, rightMargin);
|
||||
}
|
||||
|
||||
QMargins margins((m_d->m_iconEnabled[realLeft] ? leftMargin : 0), 0,
|
||||
(m_d->m_iconEnabled[realRight] ? rightMargin : 0), 0);
|
||||
QMargins margins((d->m_iconEnabled[realLeft] ? leftMargin : 0), 0,
|
||||
(d->m_iconEnabled[realRight] ? rightMargin : 0), 0);
|
||||
|
||||
setTextMargins(margins);
|
||||
}
|
||||
@@ -212,10 +212,10 @@ void FancyLineEdit::updateButtonPositions()
|
||||
|
||||
if (iconpos == FancyLineEdit::Right) {
|
||||
const int iconoffset = textMargins().right() + 4;
|
||||
m_d->m_iconbutton[i]->setGeometry(contentRect.adjusted(width() - iconoffset, 0, 0, 0));
|
||||
d->m_iconbutton[i]->setGeometry(contentRect.adjusted(width() - iconoffset, 0, 0, 0));
|
||||
} else {
|
||||
const int iconoffset = textMargins().left() + 4;
|
||||
m_d->m_iconbutton[i]->setGeometry(contentRect.adjusted(0, 0, -width() + iconoffset, 0));
|
||||
d->m_iconbutton[i]->setGeometry(contentRect.adjusted(0, 0, -width() + iconoffset, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void FancyLineEdit::resizeEvent(QResizeEvent *)
|
||||
|
||||
void FancyLineEdit::setButtonPixmap(Side side, const QPixmap &buttonPixmap)
|
||||
{
|
||||
m_d->m_iconbutton[side]->setPixmap(buttonPixmap);
|
||||
d->m_iconbutton[side]->setPixmap(buttonPixmap);
|
||||
updateMargins();
|
||||
updateButtonPositions();
|
||||
update();
|
||||
@@ -235,56 +235,56 @@ void FancyLineEdit::setButtonPixmap(Side side, const QPixmap &buttonPixmap)
|
||||
|
||||
QPixmap FancyLineEdit::buttonPixmap(Side side) const
|
||||
{
|
||||
return m_d->m_pixmap[side];
|
||||
return d->m_pixmap[side];
|
||||
}
|
||||
|
||||
void FancyLineEdit::setButtonMenu(Side side, QMenu *buttonMenu)
|
||||
{
|
||||
m_d->m_menu[side] = buttonMenu;
|
||||
m_d->m_iconbutton[side]->setIconOpacity(1.0);
|
||||
d->m_menu[side] = buttonMenu;
|
||||
d->m_iconbutton[side]->setIconOpacity(1.0);
|
||||
}
|
||||
|
||||
QMenu *FancyLineEdit::buttonMenu(Side side) const
|
||||
{
|
||||
return m_d->m_menu[side];
|
||||
return d->m_menu[side];
|
||||
}
|
||||
|
||||
bool FancyLineEdit::hasMenuTabFocusTrigger(Side side) const
|
||||
{
|
||||
return m_d->m_menuTabFocusTrigger[side];
|
||||
return d->m_menuTabFocusTrigger[side];
|
||||
}
|
||||
|
||||
void FancyLineEdit::setMenuTabFocusTrigger(Side side, bool v)
|
||||
{
|
||||
if (m_d->m_menuTabFocusTrigger[side] == v)
|
||||
if (d->m_menuTabFocusTrigger[side] == v)
|
||||
return;
|
||||
|
||||
m_d->m_menuTabFocusTrigger[side] = v;
|
||||
m_d->m_iconbutton[side]->setFocusPolicy(v ? Qt::TabFocus : Qt::NoFocus);
|
||||
d->m_menuTabFocusTrigger[side] = v;
|
||||
d->m_iconbutton[side]->setFocusPolicy(v ? Qt::TabFocus : Qt::NoFocus);
|
||||
}
|
||||
|
||||
bool FancyLineEdit::hasAutoHideButton(Side side) const
|
||||
{
|
||||
return m_d->m_iconbutton[side]->hasAutoHide();
|
||||
return d->m_iconbutton[side]->hasAutoHide();
|
||||
}
|
||||
|
||||
void FancyLineEdit::setAutoHideButton(Side side, bool h)
|
||||
{
|
||||
m_d->m_iconbutton[side]->setAutoHide(h);
|
||||
d->m_iconbutton[side]->setAutoHide(h);
|
||||
if (h)
|
||||
m_d->m_iconbutton[side]->setIconOpacity(text().isEmpty() ? 0.0 : 1.0);
|
||||
d->m_iconbutton[side]->setIconOpacity(text().isEmpty() ? 0.0 : 1.0);
|
||||
else
|
||||
m_d->m_iconbutton[side]->setIconOpacity(1.0);
|
||||
d->m_iconbutton[side]->setIconOpacity(1.0);
|
||||
}
|
||||
|
||||
void FancyLineEdit::setButtonToolTip(Side side, const QString &tip)
|
||||
{
|
||||
m_d->m_iconbutton[side]->setToolTip(tip);
|
||||
d->m_iconbutton[side]->setToolTip(tip);
|
||||
}
|
||||
|
||||
void FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)
|
||||
{
|
||||
m_d->m_iconbutton[side]->setFocusPolicy(policy);
|
||||
d->m_iconbutton[side]->setFocusPolicy(policy);
|
||||
}
|
||||
|
||||
// IconButton - helper class to represent a clickable icon
|
||||
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
void updateButtonPositions();
|
||||
friend class Utils::FancyLineEditPrivate;
|
||||
|
||||
FancyLineEditPrivate *m_d;
|
||||
FancyLineEditPrivate *d;
|
||||
QString m_oldText;
|
||||
};
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
private:
|
||||
// not used atm
|
||||
IWelcomePagePrivate *m_d;
|
||||
IWelcomePagePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -345,48 +345,48 @@ struct BaseFileWizardPrivate
|
||||
BaseFileWizard::BaseFileWizard(const BaseFileWizardParameters ¶meters,
|
||||
QObject *parent) :
|
||||
IWizard(parent),
|
||||
m_d(new BaseFileWizardPrivate(parameters))
|
||||
d(new BaseFileWizardPrivate(parameters))
|
||||
{
|
||||
}
|
||||
|
||||
BaseFileWizard::~BaseFileWizard()
|
||||
{
|
||||
delete m_d;
|
||||
delete d;
|
||||
}
|
||||
|
||||
IWizard::WizardKind BaseFileWizard::kind() const
|
||||
{
|
||||
return m_d->m_parameters.kind();
|
||||
return d->m_parameters.kind();
|
||||
}
|
||||
|
||||
QIcon BaseFileWizard::icon() const
|
||||
{
|
||||
return m_d->m_parameters.icon();
|
||||
return d->m_parameters.icon();
|
||||
}
|
||||
|
||||
QString BaseFileWizard::description() const
|
||||
{
|
||||
return m_d->m_parameters.description();
|
||||
return d->m_parameters.description();
|
||||
}
|
||||
|
||||
QString BaseFileWizard::displayName() const
|
||||
{
|
||||
return m_d->m_parameters.displayName();
|
||||
return d->m_parameters.displayName();
|
||||
}
|
||||
|
||||
QString BaseFileWizard::id() const
|
||||
{
|
||||
return m_d->m_parameters.id();
|
||||
return d->m_parameters.id();
|
||||
}
|
||||
|
||||
QString BaseFileWizard::category() const
|
||||
{
|
||||
return m_d->m_parameters.category();
|
||||
return d->m_parameters.category();
|
||||
}
|
||||
|
||||
QString BaseFileWizard::displayCategory() const
|
||||
{
|
||||
return m_d->m_parameters.displayCategory();
|
||||
return d->m_parameters.displayCategory();
|
||||
}
|
||||
|
||||
void BaseFileWizard::runWizard(const QString &path, QWidget *parent)
|
||||
|
||||
@@ -143,7 +143,7 @@ protected:
|
||||
static bool postGenerateOpenEditors(const GeneratedFiles &l, QString *errorMessage = 0);
|
||||
|
||||
private:
|
||||
BaseFileWizardPrivate *m_d;
|
||||
BaseFileWizardPrivate *d;
|
||||
};
|
||||
|
||||
class CORE_EXPORT StandardFileWizard : public BaseFileWizard
|
||||
|
||||
@@ -60,7 +60,7 @@ QmlJSToolsSettings *QmlJSToolsSettings::m_instance = 0;
|
||||
|
||||
QmlJSToolsSettings::QmlJSToolsSettings(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_d(new Internal::QmlJSToolsSettingsPrivate)
|
||||
, d(new Internal::QmlJSToolsSettingsPrivate)
|
||||
{
|
||||
QTC_ASSERT(!m_instance, return);
|
||||
m_instance = this;
|
||||
@@ -68,21 +68,21 @@ QmlJSToolsSettings::QmlJSToolsSettings(QObject *parent)
|
||||
if (const QSettings *s = Core::ICore::instance()->settings()) {
|
||||
TextEditor::TextEditorSettings *textEditorSettings = TextEditor::TextEditorSettings::instance();
|
||||
TextEditor::TabPreferences *tabPrefs = textEditorSettings->tabPreferences();
|
||||
m_d->m_tabPreferences
|
||||
d->m_tabPreferences
|
||||
= new TextEditor::TabPreferences(QList<TextEditor::IFallbackPreferences *>()
|
||||
<< tabPrefs, this);
|
||||
m_d->m_tabPreferences->setCurrentFallback(tabPrefs);
|
||||
m_d->m_tabPreferences->setFallbackEnabled(tabPrefs, false);
|
||||
m_d->m_tabPreferences->fromSettings(QmlJSTools::Constants::QML_JS_SETTINGS_ID, s);
|
||||
m_d->m_tabPreferences->setDisplayName(tr("Global Qt Quick", "Settings"));
|
||||
m_d->m_tabPreferences->setId(idKey);
|
||||
textEditorSettings->registerLanguageTabPreferences(QmlJSTools::Constants::QML_JS_SETTINGS_ID, m_d->m_tabPreferences);
|
||||
d->m_tabPreferences->setCurrentFallback(tabPrefs);
|
||||
d->m_tabPreferences->setFallbackEnabled(tabPrefs, false);
|
||||
d->m_tabPreferences->fromSettings(QmlJSTools::Constants::QML_JS_SETTINGS_ID, s);
|
||||
d->m_tabPreferences->setDisplayName(tr("Global Qt Quick", "Settings"));
|
||||
d->m_tabPreferences->setId(idKey);
|
||||
textEditorSettings->registerLanguageTabPreferences(QmlJSTools::Constants::QML_JS_SETTINGS_ID, d->m_tabPreferences);
|
||||
}
|
||||
}
|
||||
|
||||
QmlJSToolsSettings::~QmlJSToolsSettings()
|
||||
{
|
||||
delete m_d;
|
||||
delete d;
|
||||
|
||||
m_instance = 0;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ QmlJSToolsSettings *QmlJSToolsSettings::instance()
|
||||
|
||||
TextEditor::TabPreferences *QmlJSToolsSettings::tabPreferences() const
|
||||
{
|
||||
return m_d->m_tabPreferences;
|
||||
return d->m_tabPreferences;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
TextEditor::TabPreferences *tabPreferences() const;
|
||||
|
||||
private:
|
||||
Internal::QmlJSToolsSettingsPrivate *m_d;
|
||||
Internal::QmlJSToolsSettingsPrivate *d;
|
||||
|
||||
static QmlJSToolsSettings *m_instance;
|
||||
};
|
||||
|
||||
@@ -79,16 +79,16 @@ class Html5AppWizardPrivate
|
||||
|
||||
Html5AppWizard::Html5AppWizard()
|
||||
: AbstractMobileAppWizard(parameters())
|
||||
, m_d(new Html5AppWizardPrivate)
|
||||
, d(new Html5AppWizardPrivate)
|
||||
{
|
||||
m_d->app = new Html5App;
|
||||
m_d->wizardDialog = 0;
|
||||
d->app = new Html5App;
|
||||
d->wizardDialog = 0;
|
||||
}
|
||||
|
||||
Html5AppWizard::~Html5AppWizard()
|
||||
{
|
||||
delete m_d->app;
|
||||
delete m_d;
|
||||
delete d->app;
|
||||
delete d;
|
||||
}
|
||||
|
||||
Core::BaseFileWizardParameters Html5AppWizard::parameters()
|
||||
@@ -111,15 +111,15 @@ Core::BaseFileWizardParameters Html5AppWizard::parameters()
|
||||
|
||||
AbstractMobileAppWizardDialog *Html5AppWizard::createWizardDialogInternal(QWidget *parent) const
|
||||
{
|
||||
m_d->wizardDialog = new Html5AppWizardDialog(parent);
|
||||
m_d->wizardDialog->m_htmlOptionsPage->setTouchOptimizationEndabled(
|
||||
m_d->app->touchOptimizedNavigationEnabled());
|
||||
return m_d->wizardDialog;
|
||||
d->wizardDialog = new Html5AppWizardDialog(parent);
|
||||
d->wizardDialog->m_htmlOptionsPage->setTouchOptimizationEndabled(
|
||||
d->app->touchOptimizedNavigationEnabled());
|
||||
return d->wizardDialog;
|
||||
}
|
||||
|
||||
void Html5AppWizard::projectPathChanged(const QString &path) const
|
||||
{
|
||||
m_d->wizardDialog->targetsPage()->setProFilePath(path);
|
||||
d->wizardDialog->targetsPage()->setProFilePath(path);
|
||||
}
|
||||
|
||||
void Html5AppWizard::prepareGenerateFiles(const QWizard *w,
|
||||
@@ -127,27 +127,27 @@ void Html5AppWizard::prepareGenerateFiles(const QWizard *w,
|
||||
{
|
||||
Q_UNUSED(errorMessage)
|
||||
const Html5AppWizardDialog *wizard = qobject_cast<const Html5AppWizardDialog*>(w);
|
||||
m_d->app->setMainHtml(wizard->m_htmlOptionsPage->mainHtmlMode(),
|
||||
d->app->setMainHtml(wizard->m_htmlOptionsPage->mainHtmlMode(),
|
||||
wizard->m_htmlOptionsPage->mainHtmlData());
|
||||
m_d->app->setTouchOptimizedNavigationEnabled(
|
||||
d->app->setTouchOptimizedNavigationEnabled(
|
||||
wizard->m_htmlOptionsPage->touchOptimizationEndabled());
|
||||
}
|
||||
|
||||
QString Html5AppWizard::fileToOpenPostGeneration() const
|
||||
{
|
||||
return m_d->app->mainHtmlMode() == Html5App::ModeUrl ?
|
||||
m_d->app->path(AbstractMobileApp::MainCpp)
|
||||
: m_d->app->path(Html5App::MainHtml);
|
||||
return d->app->mainHtmlMode() == Html5App::ModeUrl ?
|
||||
d->app->path(AbstractMobileApp::MainCpp)
|
||||
: d->app->path(Html5App::MainHtml);
|
||||
}
|
||||
|
||||
AbstractMobileApp *Html5AppWizard::app() const
|
||||
{
|
||||
return m_d->app;
|
||||
return d->app;
|
||||
}
|
||||
|
||||
AbstractMobileAppWizardDialog *Html5AppWizard::wizardDialog() const
|
||||
{
|
||||
return m_d->wizardDialog;
|
||||
return d->wizardDialog;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
virtual void prepareGenerateFiles(const QWizard *wizard,
|
||||
QString *errorMessage) const;
|
||||
|
||||
class Html5AppWizardPrivate *m_d;
|
||||
class Html5AppWizardPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -77,16 +77,16 @@ class MobileAppWizardPrivate
|
||||
|
||||
MobileAppWizard::MobileAppWizard()
|
||||
: AbstractMobileAppWizard(parameters())
|
||||
, m_d(new MobileAppWizardPrivate)
|
||||
, d(new MobileAppWizardPrivate)
|
||||
{
|
||||
m_d->mobileApp = new MobileApp;
|
||||
m_d->wizardDialog = 0;
|
||||
d->mobileApp = new MobileApp;
|
||||
d->wizardDialog = 0;
|
||||
}
|
||||
|
||||
MobileAppWizard::~MobileAppWizard()
|
||||
{
|
||||
delete m_d->mobileApp;
|
||||
delete m_d;
|
||||
delete d->mobileApp;
|
||||
delete d;
|
||||
}
|
||||
|
||||
Core::BaseFileWizardParameters MobileAppWizard::parameters()
|
||||
@@ -104,13 +104,13 @@ Core::BaseFileWizardParameters MobileAppWizard::parameters()
|
||||
|
||||
AbstractMobileAppWizardDialog *MobileAppWizard::createWizardDialogInternal(QWidget *parent) const
|
||||
{
|
||||
m_d->wizardDialog = new MobileAppWizardDialog(parent);
|
||||
return m_d->wizardDialog;
|
||||
d->wizardDialog = new MobileAppWizardDialog(parent);
|
||||
return d->wizardDialog;
|
||||
}
|
||||
|
||||
void MobileAppWizard::projectPathChanged(const QString &path) const
|
||||
{
|
||||
m_d->wizardDialog->targetsPage()->setProFilePath(path);
|
||||
d->wizardDialog->targetsPage()->setProFilePath(path);
|
||||
}
|
||||
|
||||
void MobileAppWizard::prepareGenerateFiles(const QWizard *w,
|
||||
@@ -127,12 +127,12 @@ QString MobileAppWizard::fileToOpenPostGeneration() const
|
||||
|
||||
AbstractMobileApp *MobileAppWizard::app() const
|
||||
{
|
||||
return m_d->mobileApp;
|
||||
return d->mobileApp;
|
||||
}
|
||||
|
||||
AbstractMobileAppWizardDialog *MobileAppWizard::wizardDialog() const
|
||||
{
|
||||
return m_d->wizardDialog;
|
||||
return d->wizardDialog;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
virtual void prepareGenerateFiles(const QWizard *wizard,
|
||||
QString *errorMessage) const;
|
||||
|
||||
class MobileAppWizardPrivate *m_d;
|
||||
class MobileAppWizardPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -114,16 +114,16 @@ class QtQuickAppWizardPrivate
|
||||
|
||||
QtQuickAppWizard::QtQuickAppWizard()
|
||||
: AbstractMobileAppWizard(parameters())
|
||||
, m_d(new QtQuickAppWizardPrivate)
|
||||
, d(new QtQuickAppWizardPrivate)
|
||||
{
|
||||
m_d->app = new QtQuickApp;
|
||||
m_d->wizardDialog = 0;
|
||||
d->app = new QtQuickApp;
|
||||
d->wizardDialog = 0;
|
||||
}
|
||||
|
||||
QtQuickAppWizard::~QtQuickAppWizard()
|
||||
{
|
||||
delete m_d->app;
|
||||
delete m_d;
|
||||
delete d->app;
|
||||
delete d;
|
||||
}
|
||||
|
||||
Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
|
||||
@@ -148,14 +148,14 @@ Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
|
||||
|
||||
AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWidget *parent) const
|
||||
{
|
||||
m_d->wizardDialog = new QtQuickAppWizardDialog(parent);
|
||||
m_d->wizardDialog->m_componentOptionsPage->setComponentSet(m_d->app->componentSet());
|
||||
return m_d->wizardDialog;
|
||||
d->wizardDialog = new QtQuickAppWizardDialog(parent);
|
||||
d->wizardDialog->m_componentOptionsPage->setComponentSet(d->app->componentSet());
|
||||
return d->wizardDialog;
|
||||
}
|
||||
|
||||
void QtQuickAppWizard::projectPathChanged(const QString &path) const
|
||||
{
|
||||
m_d->wizardDialog->targetsPage()->setProFilePath(path);
|
||||
d->wizardDialog->targetsPage()->setProFilePath(path);
|
||||
}
|
||||
|
||||
void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,
|
||||
@@ -164,29 +164,29 @@ void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,
|
||||
Q_UNUSED(errorMessage)
|
||||
const QtQuickAppWizardDialog *wizard = qobject_cast<const QtQuickAppWizardDialog*>(w);
|
||||
if (wizard->m_componentOptionsPage->mainQmlMode() == QtQuickApp::ModeGenerate) {
|
||||
m_d->app->setMainQml(QtQuickApp::ModeGenerate);
|
||||
d->app->setMainQml(QtQuickApp::ModeGenerate);
|
||||
} else {
|
||||
const QString mainQmlFile = wizard->m_componentOptionsPage->mainQmlFile();
|
||||
m_d->app->setMainQml(QtQuickApp::ModeImport, mainQmlFile);
|
||||
d->app->setMainQml(QtQuickApp::ModeImport, mainQmlFile);
|
||||
}
|
||||
m_d->app->setComponentSet(wizard->m_componentOptionsPage->componentSet());
|
||||
if (m_d->app->componentSet() == QtQuickApp::Symbian10Components)
|
||||
m_d->app->setOrientation(AbstractMobileApp::ScreenOrientationImplicit);
|
||||
d->app->setComponentSet(wizard->m_componentOptionsPage->componentSet());
|
||||
if (d->app->componentSet() == QtQuickApp::Symbian10Components)
|
||||
d->app->setOrientation(AbstractMobileApp::ScreenOrientationImplicit);
|
||||
}
|
||||
|
||||
QString QtQuickAppWizard::fileToOpenPostGeneration() const
|
||||
{
|
||||
return m_d->app->path(QtQuickApp::MainQml);
|
||||
return d->app->path(QtQuickApp::MainQml);
|
||||
}
|
||||
|
||||
AbstractMobileApp *QtQuickAppWizard::app() const
|
||||
{
|
||||
return m_d->app;
|
||||
return d->app;
|
||||
}
|
||||
|
||||
AbstractMobileAppWizardDialog *QtQuickAppWizard::wizardDialog() const
|
||||
{
|
||||
return m_d->wizardDialog;
|
||||
return d->wizardDialog;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
virtual void prepareGenerateFiles(const QWizard *wizard,
|
||||
QString *errorMessage) const;
|
||||
|
||||
class QtQuickAppWizardPrivate *m_d;
|
||||
class QtQuickAppWizardPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -70,29 +70,29 @@ BaseVCSEditorFactoryPrivate::BaseVCSEditorFactoryPrivate(const VCSBaseEditorPara
|
||||
}
|
||||
|
||||
BaseVCSEditorFactory::BaseVCSEditorFactory(const VCSBaseEditorParameters *t)
|
||||
: m_d(new BaseVCSEditorFactoryPrivate(t))
|
||||
: d(new BaseVCSEditorFactoryPrivate(t))
|
||||
{
|
||||
m_d->m_displayName = QCoreApplication::translate("VCS", t->displayName);
|
||||
d->m_displayName = QCoreApplication::translate("VCS", t->displayName);
|
||||
}
|
||||
|
||||
BaseVCSEditorFactory::~BaseVCSEditorFactory()
|
||||
{
|
||||
delete m_d;
|
||||
delete d;
|
||||
}
|
||||
|
||||
QStringList BaseVCSEditorFactory::mimeTypes() const
|
||||
{
|
||||
return m_d->m_mimeTypes;
|
||||
return d->m_mimeTypes;
|
||||
}
|
||||
|
||||
Core::Id BaseVCSEditorFactory::id() const
|
||||
{
|
||||
return m_d->m_id;
|
||||
return d->m_id;
|
||||
}
|
||||
|
||||
QString BaseVCSEditorFactory::displayName() const
|
||||
{
|
||||
return m_d->m_displayName;
|
||||
return d->m_displayName;
|
||||
}
|
||||
|
||||
Core::IFile *BaseVCSEditorFactory::open(const QString &fileName)
|
||||
@@ -103,10 +103,10 @@ Core::IFile *BaseVCSEditorFactory::open(const QString &fileName)
|
||||
|
||||
Core::IEditor *BaseVCSEditorFactory::createEditor(QWidget *parent)
|
||||
{
|
||||
VCSBaseEditorWidget *vcsEditor = createVCSBaseEditor(m_d->m_type, parent);
|
||||
VCSBaseEditorWidget *vcsEditor = createVCSBaseEditor(d->m_type, parent);
|
||||
|
||||
vcsEditor ->setMimeType(m_d->m_mimeTypes.front());
|
||||
m_d->m_editorHandler->setupActions(vcsEditor);
|
||||
vcsEditor ->setMimeType(d->m_mimeTypes.front());
|
||||
d->m_editorHandler->setupActions(vcsEditor);
|
||||
|
||||
// Wire font settings and set initial values
|
||||
TextEditor::TextEditorSettings *settings = TextEditor::TextEditorSettings::instance();
|
||||
|
||||
@@ -66,7 +66,7 @@ private:
|
||||
virtual VCSBaseEditorWidget *createVCSBaseEditor(const VCSBaseEditorParameters *type,
|
||||
QWidget *parent) = 0;
|
||||
|
||||
BaseVCSEditorFactoryPrivate *m_d;
|
||||
BaseVCSEditorFactoryPrivate *d;
|
||||
};
|
||||
|
||||
// Utility template to create an editor.
|
||||
|
||||
@@ -56,34 +56,34 @@ BaseVCSSubmitEditorFactoryPrivate::BaseVCSSubmitEditorFactoryPrivate(const VCSBa
|
||||
}
|
||||
|
||||
BaseVCSSubmitEditorFactory::BaseVCSSubmitEditorFactory(const VCSBaseSubmitEditorParameters *parameters) :
|
||||
m_d(new BaseVCSSubmitEditorFactoryPrivate(parameters))
|
||||
d(new BaseVCSSubmitEditorFactoryPrivate(parameters))
|
||||
{
|
||||
}
|
||||
|
||||
BaseVCSSubmitEditorFactory::~BaseVCSSubmitEditorFactory()
|
||||
{
|
||||
delete m_d;
|
||||
delete d;
|
||||
}
|
||||
|
||||
Core::IEditor *BaseVCSSubmitEditorFactory::createEditor(QWidget *parent)
|
||||
{
|
||||
return createBaseSubmitEditor(m_d->m_parameters, parent);
|
||||
return createBaseSubmitEditor(d->m_parameters, parent);
|
||||
}
|
||||
|
||||
Core::Id BaseVCSSubmitEditorFactory::id() const
|
||||
{
|
||||
return m_d->m_id;
|
||||
return d->m_id;
|
||||
}
|
||||
|
||||
QString BaseVCSSubmitEditorFactory::displayName() const
|
||||
{
|
||||
return m_d->m_displayName;
|
||||
return d->m_displayName;
|
||||
}
|
||||
|
||||
|
||||
QStringList BaseVCSSubmitEditorFactory::mimeTypes() const
|
||||
{
|
||||
return m_d->m_mimeTypes;
|
||||
return d->m_mimeTypes;
|
||||
}
|
||||
|
||||
Core::IFile *BaseVCSSubmitEditorFactory::open(const QString &fileName)
|
||||
|
||||
@@ -66,7 +66,7 @@ private:
|
||||
*createBaseSubmitEditor(const VCSBaseSubmitEditorParameters *parameters,
|
||||
QWidget *parent) = 0;
|
||||
|
||||
BaseVCSSubmitEditorFactoryPrivate *m_d;
|
||||
BaseVCSSubmitEditorFactoryPrivate *d;
|
||||
};
|
||||
|
||||
// Utility template to create an editor that has a constructor taking the
|
||||
|
||||
@@ -134,13 +134,13 @@ DiffFormats DiffHighlighterPrivate::analyzeLine(const QString &text) const
|
||||
DiffHighlighter::DiffHighlighter(const QRegExp &filePattern,
|
||||
QTextDocument *document) :
|
||||
TextEditor::SyntaxHighlighter(document),
|
||||
m_d(new Internal::DiffHighlighterPrivate(filePattern))
|
||||
d(new Internal::DiffHighlighterPrivate(filePattern))
|
||||
{
|
||||
}
|
||||
|
||||
DiffHighlighter::~DiffHighlighter()
|
||||
{
|
||||
delete m_d;
|
||||
delete d;
|
||||
}
|
||||
|
||||
// Check trailing spaces
|
||||
@@ -164,20 +164,20 @@ void DiffHighlighter::highlightBlock(const QString &text)
|
||||
return;
|
||||
|
||||
const int length = text.length();
|
||||
const Internal::DiffFormats format = m_d->analyzeLine(text);
|
||||
const Internal::DiffFormats format = d->analyzeLine(text);
|
||||
switch (format) {
|
||||
case Internal::DiffTextFormat:
|
||||
break;
|
||||
case Internal::DiffInFormat: {
|
||||
// Mark trailing whitespace.
|
||||
const int trimmedLen = trimmedLength(text);
|
||||
setFormat(0, trimmedLen, m_d->m_formats[format]);
|
||||
setFormat(0, trimmedLen, d->m_formats[format]);
|
||||
if (trimmedLen != length)
|
||||
setFormat(trimmedLen, length - trimmedLen, m_d->m_addedTrailingWhiteSpaceFormat);
|
||||
setFormat(trimmedLen, length - trimmedLen, d->m_addedTrailingWhiteSpaceFormat);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
setFormat(0, length, m_d->m_formats[format]);
|
||||
setFormat(0, length, d->m_formats[format]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -186,22 +186,22 @@ void DiffHighlighter::highlightBlock(const QString &text)
|
||||
TextEditor::BaseTextDocumentLayout::userData(currentBlock());
|
||||
QTC_ASSERT(data, return; );
|
||||
if (!TextEditor::BaseTextDocumentLayout::testUserData(currentBlock().previous()))
|
||||
m_d->m_foldingState = Internal::StartOfFile;
|
||||
d->m_foldingState = Internal::StartOfFile;
|
||||
|
||||
switch (m_d->m_foldingState) {
|
||||
switch (d->m_foldingState) {
|
||||
case Internal::StartOfFile:
|
||||
case Internal::Header:
|
||||
switch (format) {
|
||||
case Internal::DiffFileFormat:
|
||||
m_d->m_foldingState = Internal::File;
|
||||
d->m_foldingState = Internal::File;
|
||||
TextEditor::BaseTextDocumentLayout::setFoldingIndent(currentBlock(), BASE_LEVEL);
|
||||
break;
|
||||
case Internal::DiffLocationFormat:
|
||||
m_d->m_foldingState = Internal::Location;
|
||||
d->m_foldingState = Internal::Location;
|
||||
TextEditor::BaseTextDocumentLayout::setFoldingIndent(currentBlock(), FILE_LEVEL);
|
||||
break;
|
||||
default:
|
||||
m_d->m_foldingState = Internal::Header;
|
||||
d->m_foldingState = Internal::Header;
|
||||
TextEditor::BaseTextDocumentLayout::setFoldingIndent(currentBlock(), BASE_LEVEL);
|
||||
break;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ void DiffHighlighter::highlightBlock(const QString &text)
|
||||
TextEditor::BaseTextDocumentLayout::setFoldingIndent(currentBlock(), FILE_LEVEL);
|
||||
break;
|
||||
case Internal::DiffLocationFormat:
|
||||
m_d->m_foldingState = Internal::Location;
|
||||
d->m_foldingState = Internal::Location;
|
||||
TextEditor::BaseTextDocumentLayout::setFoldingIndent(currentBlock(), FILE_LEVEL);
|
||||
break;
|
||||
default:
|
||||
@@ -223,7 +223,7 @@ void DiffHighlighter::highlightBlock(const QString &text)
|
||||
case Internal::Location:
|
||||
switch (format) {
|
||||
case Internal::DiffFileFormat:
|
||||
m_d->m_foldingState = Internal::File;
|
||||
d->m_foldingState = Internal::File;
|
||||
TextEditor::BaseTextDocumentLayout::setFoldingIndent(currentBlock(), BASE_LEVEL);
|
||||
break;
|
||||
case Internal::DiffLocationFormat:
|
||||
@@ -248,10 +248,10 @@ static inline QTextCharFormat invertedColorFormat(const QTextCharFormat &in)
|
||||
void DiffHighlighter::setFormats(const QVector<QTextCharFormat> &s)
|
||||
{
|
||||
if (s.size() == Internal::NumDiffFormats) {
|
||||
qCopy(s.constBegin(), s.constEnd(), m_d->m_formats);
|
||||
qCopy(s.constBegin(), s.constEnd(), d->m_formats);
|
||||
// Display trailing blanks with colors swapped
|
||||
m_d->m_addedTrailingWhiteSpaceFormat =
|
||||
invertedColorFormat(m_d->m_formats[Internal::DiffInFormat]);
|
||||
d->m_addedTrailingWhiteSpaceFormat =
|
||||
invertedColorFormat(d->m_formats[Internal::DiffInFormat]);
|
||||
} else {
|
||||
qWarning("%s: insufficient setting size: %d", Q_FUNC_INFO, s.size());
|
||||
}
|
||||
@@ -259,7 +259,7 @@ void DiffHighlighter::setFormats(const QVector<QTextCharFormat> &s)
|
||||
|
||||
QRegExp DiffHighlighter::filePattern() const
|
||||
{
|
||||
return m_d->m_filePattern;
|
||||
return d->m_filePattern;
|
||||
}
|
||||
|
||||
} // namespace VCSBase
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
QRegExp filePattern() const;
|
||||
|
||||
private:
|
||||
Internal::DiffHighlighterPrivate *m_d;
|
||||
Internal::DiffHighlighterPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace VCSBase
|
||||
|
||||
@@ -151,10 +151,10 @@ VCSBaseSubmitEditorPrivate::VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditor
|
||||
|
||||
VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *parameters,
|
||||
Utils::SubmitEditorWidget *editorWidget) :
|
||||
m_d(new VCSBaseSubmitEditorPrivate(parameters, editorWidget, this))
|
||||
d(new VCSBaseSubmitEditorPrivate(parameters, editorWidget, this))
|
||||
{
|
||||
setContext(Core::Context(parameters->context));
|
||||
setWidget(m_d->m_widget);
|
||||
setWidget(d->m_widget);
|
||||
|
||||
// Message font according to settings
|
||||
const TextEditor::FontSettings fs = TextEditor::TextEditorSettings::instance()->fontSettings();
|
||||
@@ -163,31 +163,31 @@ VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *pa
|
||||
font.setPointSize(fs.fontSize());
|
||||
editorWidget->descriptionEdit()->setFont(font);
|
||||
|
||||
m_d->m_file->setModified(false);
|
||||
d->m_file->setModified(false);
|
||||
// We are always clean to prevent the editor manager from asking to save.
|
||||
connect(m_d->m_file, SIGNAL(saveMe(QString*, QString, bool)),
|
||||
connect(d->m_file, SIGNAL(saveMe(QString*, QString, bool)),
|
||||
this, SLOT(save(QString*, QString, bool)));
|
||||
|
||||
connect(m_d->m_widget, SIGNAL(diffSelected(QStringList)), this, SLOT(slotDiffSelectedVCSFiles(QStringList)));
|
||||
connect(m_d->m_widget->descriptionEdit(), SIGNAL(textChanged()), this, SLOT(slotDescriptionChanged()));
|
||||
connect(d->m_widget, SIGNAL(diffSelected(QStringList)), this, SLOT(slotDiffSelectedVCSFiles(QStringList)));
|
||||
connect(d->m_widget->descriptionEdit(), SIGNAL(textChanged()), this, SLOT(slotDescriptionChanged()));
|
||||
|
||||
const Internal::CommonVcsSettings settings = Internal::VCSPlugin::instance()->settings();
|
||||
// Add additional context menu settings
|
||||
if (!settings.submitMessageCheckScript.isEmpty() || !settings.nickNameMailMap.isEmpty()) {
|
||||
QAction *sep = new QAction(this);
|
||||
sep->setSeparator(true);
|
||||
m_d->m_widget->addDescriptionEditContextMenuAction(sep);
|
||||
d->m_widget->addDescriptionEditContextMenuAction(sep);
|
||||
// Run check action
|
||||
if (!settings.submitMessageCheckScript.isEmpty()) {
|
||||
QAction *checkAction = new QAction(tr("Check Message"), this);
|
||||
connect(checkAction, SIGNAL(triggered()), this, SLOT(slotCheckSubmitMessage()));
|
||||
m_d->m_widget->addDescriptionEditContextMenuAction(checkAction);
|
||||
d->m_widget->addDescriptionEditContextMenuAction(checkAction);
|
||||
}
|
||||
// Insert nick
|
||||
if (!settings.nickNameMailMap.isEmpty()) {
|
||||
QAction *insertAction = new QAction(tr("Insert Name..."), this);
|
||||
connect(insertAction, SIGNAL(triggered()), this, SLOT(slotInsertNickName()));
|
||||
m_d->m_widget->addDescriptionEditContextMenuAction(insertAction);
|
||||
d->m_widget->addDescriptionEditContextMenuAction(insertAction);
|
||||
}
|
||||
}
|
||||
// Do we have user fields?
|
||||
@@ -201,15 +201,15 @@ VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *pa
|
||||
this, SLOT(slotUpdateEditorSettings(VCSBase::Internal::CommonVcsSettings)));
|
||||
|
||||
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate;
|
||||
aggregate->add(new Find::BaseTextFind(m_d->m_widget->descriptionEdit()));
|
||||
aggregate->add(new Find::BaseTextFind(d->m_widget->descriptionEdit()));
|
||||
aggregate->add(this);
|
||||
}
|
||||
|
||||
VCSBaseSubmitEditor::~VCSBaseSubmitEditor()
|
||||
{
|
||||
delete m_d->m_toolWidget;
|
||||
delete m_d->m_widget;
|
||||
delete m_d;
|
||||
delete d->m_toolWidget;
|
||||
delete d->m_widget;
|
||||
delete d;
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::slotUpdateEditorSettings(const Internal::CommonVcsSettings &s)
|
||||
@@ -251,72 +251,72 @@ void VCSBaseSubmitEditor::createUserFields(const QString &fieldConfigFile)
|
||||
fieldWidget->setAllowDuplicateFields(true);
|
||||
fieldWidget->setHasBrowseButton(true);
|
||||
fieldWidget->setFields(fields);
|
||||
m_d->m_widget->addSubmitFieldWidget(fieldWidget);
|
||||
d->m_widget->addSubmitFieldWidget(fieldWidget);
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::registerActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction, QAction *diffAction)\
|
||||
{
|
||||
m_d->m_widget->registerActions(editorUndoAction, editorRedoAction, submitAction, diffAction);
|
||||
m_d->m_diffAction = diffAction;
|
||||
m_d->m_submitAction = submitAction;
|
||||
d->m_widget->registerActions(editorUndoAction, editorRedoAction, submitAction, diffAction);
|
||||
d->m_diffAction = diffAction;
|
||||
d->m_submitAction = submitAction;
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction, QAction *diffAction)
|
||||
{
|
||||
m_d->m_widget->unregisterActions(editorUndoAction, editorRedoAction, submitAction, diffAction);
|
||||
m_d->m_diffAction = m_d->m_submitAction = 0;
|
||||
d->m_widget->unregisterActions(editorUndoAction, editorRedoAction, submitAction, diffAction);
|
||||
d->m_diffAction = d->m_submitAction = 0;
|
||||
}
|
||||
|
||||
int VCSBaseSubmitEditor::fileNameColumn() const
|
||||
{
|
||||
return m_d->m_widget->fileNameColumn();
|
||||
return d->m_widget->fileNameColumn();
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setFileNameColumn(int c)
|
||||
{
|
||||
m_d->m_widget->setFileNameColumn(c);
|
||||
d->m_widget->setFileNameColumn(c);
|
||||
}
|
||||
|
||||
QAbstractItemView::SelectionMode VCSBaseSubmitEditor::fileListSelectionMode() const
|
||||
{
|
||||
return m_d->m_widget->fileListSelectionMode();
|
||||
return d->m_widget->fileListSelectionMode();
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setFileListSelectionMode(QAbstractItemView::SelectionMode sm)
|
||||
{
|
||||
m_d->m_widget->setFileListSelectionMode(sm);
|
||||
d->m_widget->setFileListSelectionMode(sm);
|
||||
}
|
||||
|
||||
bool VCSBaseSubmitEditor::isEmptyFileListEnabled() const
|
||||
{
|
||||
return m_d->m_widget->isEmptyFileListEnabled();
|
||||
return d->m_widget->isEmptyFileListEnabled();
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setEmptyFileListEnabled(bool e)
|
||||
{
|
||||
m_d->m_widget->setEmptyFileListEnabled(e);
|
||||
d->m_widget->setEmptyFileListEnabled(e);
|
||||
}
|
||||
|
||||
bool VCSBaseSubmitEditor::lineWrap() const
|
||||
{
|
||||
return m_d->m_widget->lineWrap();
|
||||
return d->m_widget->lineWrap();
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setLineWrap(bool w)
|
||||
{
|
||||
m_d->m_widget->setLineWrap(w);
|
||||
d->m_widget->setLineWrap(w);
|
||||
}
|
||||
|
||||
int VCSBaseSubmitEditor::lineWrapWidth() const
|
||||
{
|
||||
return m_d->m_widget->lineWrapWidth();
|
||||
return d->m_widget->lineWrapWidth();
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setLineWrapWidth(int w)
|
||||
{
|
||||
m_d->m_widget->setLineWrapWidth(w);
|
||||
d->m_widget->setLineWrapWidth(w);
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::slotDescriptionChanged()
|
||||
@@ -342,37 +342,37 @@ bool VCSBaseSubmitEditor::open(QString *errorString, const QString &fileName, co
|
||||
if (!createNew(text))
|
||||
return false;
|
||||
|
||||
m_d->m_file->setFileName(QFileInfo(fileName).absoluteFilePath());
|
||||
m_d->m_file->setModified(fileName != realFileName);
|
||||
d->m_file->setFileName(QFileInfo(fileName).absoluteFilePath());
|
||||
d->m_file->setModified(fileName != realFileName);
|
||||
return true;
|
||||
}
|
||||
|
||||
Core::IFile *VCSBaseSubmitEditor::file()
|
||||
{
|
||||
return m_d->m_file;
|
||||
return d->m_file;
|
||||
}
|
||||
|
||||
QString VCSBaseSubmitEditor::displayName() const
|
||||
{
|
||||
if (m_d->m_displayName.isEmpty())
|
||||
m_d->m_displayName = QCoreApplication::translate("VCS", m_d->m_parameters->displayName);
|
||||
return m_d->m_displayName;
|
||||
if (d->m_displayName.isEmpty())
|
||||
d->m_displayName = QCoreApplication::translate("VCS", d->m_parameters->displayName);
|
||||
return d->m_displayName;
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setDisplayName(const QString &title)
|
||||
{
|
||||
m_d->m_displayName = title;
|
||||
d->m_displayName = title;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
QString VCSBaseSubmitEditor::checkScriptWorkingDirectory() const
|
||||
{
|
||||
return m_d->m_checkScriptWorkingDirectory;
|
||||
return d->m_checkScriptWorkingDirectory;
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setCheckScriptWorkingDirectory(const QString &s)
|
||||
{
|
||||
m_d->m_checkScriptWorkingDirectory = s;
|
||||
d->m_checkScriptWorkingDirectory = s;
|
||||
}
|
||||
|
||||
bool VCSBaseSubmitEditor::duplicateSupported() const
|
||||
@@ -387,7 +387,7 @@ Core::IEditor *VCSBaseSubmitEditor::duplicate(QWidget * /*parent*/)
|
||||
|
||||
QString VCSBaseSubmitEditor::id() const
|
||||
{
|
||||
return m_d->m_parameters->id;
|
||||
return d->m_parameters->id;
|
||||
}
|
||||
|
||||
static QToolBar *createToolBar(const QWidget *someWidget, QAction *submitAction, QAction *diffAction)
|
||||
@@ -411,15 +411,15 @@ QWidget *VCSBaseSubmitEditor::toolBar()
|
||||
if (!wantToolBar)
|
||||
return 0;
|
||||
|
||||
if (m_d->m_toolWidget)
|
||||
return m_d->m_toolWidget;
|
||||
if (d->m_toolWidget)
|
||||
return d->m_toolWidget;
|
||||
|
||||
if (!m_d->m_diffAction && !m_d->m_submitAction)
|
||||
if (!d->m_diffAction && !d->m_submitAction)
|
||||
return 0;
|
||||
|
||||
// Create
|
||||
m_d->m_toolWidget = createToolBar(m_d->m_widget, m_d->m_submitAction, m_d->m_diffAction);
|
||||
return m_d->m_toolWidget;
|
||||
d->m_toolWidget = createToolBar(d->m_widget, d->m_submitAction, d->m_diffAction);
|
||||
return d->m_toolWidget;
|
||||
}
|
||||
|
||||
QByteArray VCSBaseSubmitEditor::saveState() const
|
||||
@@ -434,17 +434,17 @@ bool VCSBaseSubmitEditor::restoreState(const QByteArray &/*state*/)
|
||||
|
||||
QStringList VCSBaseSubmitEditor::checkedFiles() const
|
||||
{
|
||||
return m_d->m_widget->checkedFiles();
|
||||
return d->m_widget->checkedFiles();
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::setFileModel(QAbstractItemModel *m)
|
||||
{
|
||||
m_d->m_widget->setFileModel(m);
|
||||
d->m_widget->setFileModel(m);
|
||||
}
|
||||
|
||||
QAbstractItemModel *VCSBaseSubmitEditor::fileModel() const
|
||||
{
|
||||
return m_d->m_widget->fileModel();
|
||||
return d->m_widget->fileModel();
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::slotDiffSelectedVCSFiles(const QStringList &rawList)
|
||||
@@ -454,7 +454,7 @@ void VCSBaseSubmitEditor::slotDiffSelectedVCSFiles(const QStringList &rawList)
|
||||
|
||||
bool VCSBaseSubmitEditor::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
{
|
||||
const QString fName = fileName.isEmpty() ? m_d->m_file->fileName() : fileName;
|
||||
const QString fName = fileName.isEmpty() ? d->m_file->fileName() : fileName;
|
||||
Utils::FileSaver saver(fName, QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text);
|
||||
saver.write(fileContents().toLocal8Bit());
|
||||
if (!saver.finalize(errorString))
|
||||
@@ -462,19 +462,19 @@ bool VCSBaseSubmitEditor::save(QString *errorString, const QString &fileName, bo
|
||||
if (autoSave)
|
||||
return true;
|
||||
const QFileInfo fi(fName);
|
||||
m_d->m_file->setFileName(fi.absoluteFilePath());
|
||||
m_d->m_file->setModified(false);
|
||||
d->m_file->setFileName(fi.absoluteFilePath());
|
||||
d->m_file->setModified(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
QString VCSBaseSubmitEditor::fileContents() const
|
||||
{
|
||||
return m_d->m_widget->descriptionText();
|
||||
return d->m_widget->descriptionText();
|
||||
}
|
||||
|
||||
bool VCSBaseSubmitEditor::setFileContents(const QString &contents)
|
||||
{
|
||||
m_d->m_widget->setDescriptionText(contents);
|
||||
d->m_widget->setDescriptionText(contents);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -554,10 +554,10 @@ VCSBaseSubmitEditor::PromptSubmitResult
|
||||
|
||||
QString VCSBaseSubmitEditor::promptForNickName()
|
||||
{
|
||||
if (!m_d->m_nickNameDialog)
|
||||
m_d->m_nickNameDialog = new Internal::NickNameDialog(Internal::VCSPlugin::instance()->nickNameModel(), m_d->m_widget);
|
||||
if (m_d->m_nickNameDialog->exec() == QDialog::Accepted)
|
||||
return m_d->m_nickNameDialog->nickName();
|
||||
if (!d->m_nickNameDialog)
|
||||
d->m_nickNameDialog = new Internal::NickNameDialog(Internal::VCSPlugin::instance()->nickNameModel(), d->m_widget);
|
||||
if (d->m_nickNameDialog->exec() == QDialog::Accepted)
|
||||
return d->m_nickNameDialog->nickName();
|
||||
return QString();
|
||||
}
|
||||
|
||||
@@ -565,12 +565,12 @@ void VCSBaseSubmitEditor::slotInsertNickName()
|
||||
{
|
||||
const QString nick = promptForNickName();
|
||||
if (!nick.isEmpty())
|
||||
m_d->m_widget->descriptionEdit()->textCursor().insertText(nick);
|
||||
d->m_widget->descriptionEdit()->textCursor().insertText(nick);
|
||||
}
|
||||
|
||||
void VCSBaseSubmitEditor::slotSetFieldNickName(int i)
|
||||
{
|
||||
if (Utils::SubmitFieldWidget *sfw =m_d->m_widget->submitFieldWidgets().front()) {
|
||||
if (Utils::SubmitFieldWidget *sfw =d->m_widget->submitFieldWidgets().front()) {
|
||||
const QString nick = promptForNickName();
|
||||
if (!nick.isEmpty())
|
||||
sfw->setFieldValue(i, nick);
|
||||
@@ -582,7 +582,7 @@ void VCSBaseSubmitEditor::slotCheckSubmitMessage()
|
||||
QString errorMessage;
|
||||
if (!checkSubmitMessage(&errorMessage)) {
|
||||
QMessageBox msgBox(QMessageBox::Warning, tr("Submit Message Check Failed"),
|
||||
errorMessage, QMessageBox::Ok, m_d->m_widget);
|
||||
errorMessage, QMessageBox::Ok, d->m_widget);
|
||||
msgBox.setMinimumWidth(checkDialogMinimumWidth);
|
||||
msgBox.exec();
|
||||
}
|
||||
@@ -621,10 +621,10 @@ bool VCSBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript
|
||||
return false;
|
||||
// Run check process
|
||||
VCSBaseOutputWindow *outputWindow = VCSBaseOutputWindow::instance();
|
||||
outputWindow->appendCommand(msgCheckScript(m_d->m_checkScriptWorkingDirectory, checkScript));
|
||||
outputWindow->appendCommand(msgCheckScript(d->m_checkScriptWorkingDirectory, checkScript));
|
||||
QProcess checkProcess;
|
||||
if (!m_d->m_checkScriptWorkingDirectory.isEmpty())
|
||||
checkProcess.setWorkingDirectory(m_d->m_checkScriptWorkingDirectory);
|
||||
if (!d->m_checkScriptWorkingDirectory.isEmpty())
|
||||
checkProcess.setWorkingDirectory(d->m_checkScriptWorkingDirectory);
|
||||
checkProcess.start(checkScript, QStringList(saver.fileName()));
|
||||
checkProcess.closeWriteChannel();
|
||||
if (!checkProcess.waitForStarted()) {
|
||||
|
||||
@@ -179,7 +179,7 @@ private:
|
||||
bool runSubmitMessageCheckScript(const QString &script, QString *errorMessage) const;
|
||||
QString promptForNickName();
|
||||
|
||||
VCSBaseSubmitEditorPrivate *m_d;
|
||||
VCSBaseSubmitEditorPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace VCSBase
|
||||
|
||||
Reference in New Issue
Block a user