forked from qt-creator/qt-creator
Utils: Remove unneeded namespace qualifications
Change-Id: Iacab8410ab4d3b63f96e7541b450e3cc729ab662 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -59,7 +59,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
BaseTreeView::BaseTreeView(QWidget *parent)
|
BaseTreeView::BaseTreeView(QWidget *parent)
|
||||||
: Utils::TreeView(parent)
|
: TreeView(parent)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_MacShowFocusRect, false);
|
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
setFrameStyle(QFrame::NoFrame);
|
setFrameStyle(QFrame::NoFrame);
|
||||||
@@ -87,7 +87,7 @@ void BaseTreeView::setModel(QAbstractItemModel *m)
|
|||||||
if (index != -1)
|
if (index != -1)
|
||||||
disconnect(model(), SIGNAL(columnAdjustmentRequested()), this, SLOT(resizeColumns()));
|
disconnect(model(), SIGNAL(columnAdjustmentRequested()), this, SLOT(resizeColumns()));
|
||||||
}
|
}
|
||||||
Utils::TreeView::setModel(m);
|
TreeView::setModel(m);
|
||||||
if (m) {
|
if (m) {
|
||||||
int index = m->metaObject()->indexOfSignal(sig);
|
int index = m->metaObject()->indexOfSignal(sig);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
@@ -97,7 +97,7 @@ void BaseTreeView::setModel(QAbstractItemModel *m)
|
|||||||
|
|
||||||
void BaseTreeView::mousePressEvent(QMouseEvent *ev)
|
void BaseTreeView::mousePressEvent(QMouseEvent *ev)
|
||||||
{
|
{
|
||||||
Utils::TreeView::mousePressEvent(ev);
|
TreeView::mousePressEvent(ev);
|
||||||
const QModelIndex mi = indexAt(ev->pos());
|
const QModelIndex mi = indexAt(ev->pos());
|
||||||
if (!mi.isValid())
|
if (!mi.isValid())
|
||||||
toggleColumnWidth(columnAt(ev->x()));
|
toggleColumnWidth(columnAt(ev->x()));
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT BaseTreeView : public Utils::TreeView
|
class QTCREATOR_UTILS_EXPORT BaseTreeView : public TreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FileName BuildableHelperLibrary::findSystemQt(const Utils::Environment &env)
|
FileName BuildableHelperLibrary::findSystemQt(const Environment &env)
|
||||||
{
|
{
|
||||||
QStringList paths = env.path();
|
QStringList paths = env.path();
|
||||||
foreach (const QString &path, paths) {
|
foreach (const QString &path, paths) {
|
||||||
@@ -78,11 +78,11 @@ Utils::FileName BuildableHelperLibrary::findSystemQt(const Utils::Environment &e
|
|||||||
qmake.setFile(qtChooserToQmakePath(qmake.symLinkTarget()));
|
qmake.setFile(qtChooserToQmakePath(qmake.symLinkTarget()));
|
||||||
|
|
||||||
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull())
|
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull())
|
||||||
return Utils::FileName(qmake);
|
return FileName(qmake);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Utils::FileName();
|
return FileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath)
|
QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath)
|
||||||
@@ -105,7 +105,7 @@ QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath, bool
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
if (!qmake.waitForFinished()) {
|
if (!qmake.waitForFinished()) {
|
||||||
Utils::SynchronousProcess::stopProcess(qmake);
|
SynchronousProcess::stopProcess(qmake);
|
||||||
qWarning("Timeout running '%s'.", qPrintable(qmakePath));
|
qWarning("Timeout running '%s'.", qPrintable(qmakePath));
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,7 @@ class QTCREATOR_UTILS_EXPORT BuildableHelperLibrary
|
|||||||
public:
|
public:
|
||||||
// returns the full path to the first qmake, qmake-qt4, qmake4 that has
|
// returns the full path to the first qmake, qmake-qt4, qmake4 that has
|
||||||
// at least version 2.0.0 and thus is a qt4 qmake
|
// at least version 2.0.0 and thus is a qt4 qmake
|
||||||
static FileName findSystemQt(const Utils::Environment &env);
|
static FileName findSystemQt(const Environment &env);
|
||||||
static bool isQtChooser(const QFileInfo &info);
|
static bool isQtChooser(const QFileInfo &info);
|
||||||
static QString qtChooserToQmakePath(const QString &path);
|
static QString qtChooserToQmakePath(const QString &path);
|
||||||
// return true if the qmake at qmakePath is qt4 (used by QtVersion)
|
// return true if the qmake at qmakePath is qt4 (used by QtVersion)
|
||||||
@@ -63,11 +63,11 @@ public:
|
|||||||
struct BuildHelperArguments {
|
struct BuildHelperArguments {
|
||||||
QString helperName;
|
QString helperName;
|
||||||
QString directory;
|
QString directory;
|
||||||
Utils::Environment environment;
|
Environment environment;
|
||||||
|
|
||||||
Utils::FileName qmakeCommand;
|
FileName qmakeCommand;
|
||||||
QString targetMode;
|
QString targetMode;
|
||||||
Utils::FileName mkspec;
|
FileName mkspec;
|
||||||
QString proFilename;
|
QString proFilename;
|
||||||
QStringList qmakeArguments;
|
QStringList qmakeArguments;
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
|
|||||||
|
|
||||||
// --------------------- ClassNameValidatingLineEdit
|
// --------------------- ClassNameValidatingLineEdit
|
||||||
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
|
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
|
||||||
Utils::FancyLineEdit(parent),
|
FancyLineEdit(parent),
|
||||||
d(new ClassNameValidatingLineEditPrivate)
|
d(new ClassNameValidatingLineEditPrivate)
|
||||||
{
|
{
|
||||||
updateRegExp();
|
updateRegExp();
|
||||||
|
@@ -36,8 +36,7 @@ namespace Utils {
|
|||||||
|
|
||||||
struct ClassNameValidatingLineEditPrivate;
|
struct ClassNameValidatingLineEditPrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit
|
class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit : public FancyLineEdit
|
||||||
: public Utils::FancyLineEdit
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
|
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
|
||||||
|
@@ -150,7 +150,7 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString stubPath = QCoreApplication::applicationDirPath();
|
QString stubPath = QCoreApplication::applicationDirPath();
|
||||||
if (Utils::HostOsInfo::isMacHost())
|
if (HostOsInfo::isMacHost())
|
||||||
stubPath.append(QLatin1String("/../Resources/qtcreator_process_stub"));
|
stubPath.append(QLatin1String("/../Resources/qtcreator_process_stub"));
|
||||||
else
|
else
|
||||||
stubPath.append(QLatin1String("/qtcreator_process_stub"));
|
stubPath.append(QLatin1String("/qtcreator_process_stub"));
|
||||||
@@ -363,7 +363,7 @@ static const Terminal knownTerminals[] =
|
|||||||
|
|
||||||
QString ConsoleProcess::defaultTerminalEmulator()
|
QString ConsoleProcess::defaultTerminalEmulator()
|
||||||
{
|
{
|
||||||
if (Utils::HostOsInfo::isMacHost()) {
|
if (HostOsInfo::isMacHost()) {
|
||||||
QString termCmd = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/scripts/openTerminal.command");
|
QString termCmd = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/scripts/openTerminal.command");
|
||||||
if (QFile(termCmd).exists())
|
if (QFile(termCmd).exists())
|
||||||
return termCmd.replace(QLatin1Char(' '), QLatin1String("\\ "));
|
return termCmd.replace(QLatin1Char(' '), QLatin1String("\\ "));
|
||||||
|
@@ -121,18 +121,18 @@ void CrumblePathButton::paintEvent(QPaintEvent *)
|
|||||||
|
|
||||||
if (m_isEnd) {
|
if (m_isEnd) {
|
||||||
if (m_isPressed || m_isSelected)
|
if (m_isPressed || m_isSelected)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentSelectedEnd, &p, geom, 2, 0, 2, 0);
|
StyleHelper::drawCornerImage(m_segmentSelectedEnd, &p, geom, 2, 0, 2, 0);
|
||||||
else if (m_isHovering)
|
else if (m_isHovering)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentHoverEnd, &p, geom, 2, 0, 2, 0);
|
StyleHelper::drawCornerImage(m_segmentHoverEnd, &p, geom, 2, 0, 2, 0);
|
||||||
else
|
else
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentEnd, &p, geom, 2, 0, 2, 0);
|
StyleHelper::drawCornerImage(m_segmentEnd, &p, geom, 2, 0, 2, 0);
|
||||||
} else {
|
} else {
|
||||||
if (m_isPressed || m_isSelected)
|
if (m_isPressed || m_isSelected)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentSelected, &p, geom, 2, 0, 12, 0);
|
StyleHelper::drawCornerImage(m_segmentSelected, &p, geom, 2, 0, 12, 0);
|
||||||
else if (m_isHovering)
|
else if (m_isHovering)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentHover, &p, geom, 2, 0, 12, 0);
|
StyleHelper::drawCornerImage(m_segmentHover, &p, geom, 2, 0, 12, 0);
|
||||||
else
|
else
|
||||||
Utils::StyleHelper::drawCornerImage(m_segment, &p, geom, 2, 0, 12, 0);
|
StyleHelper::drawCornerImage(m_segment, &p, geom, 2, 0, 12, 0);
|
||||||
}
|
}
|
||||||
if (isEnabled())
|
if (isEnabled())
|
||||||
p.setPen(StyleHelper::panelTextColor());
|
p.setPen(StyleHelper::panelTextColor());
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
QLabel *m_summaryLabel;
|
QLabel *m_summaryLabel;
|
||||||
QCheckBox *m_summaryCheckBox;
|
QCheckBox *m_summaryCheckBox;
|
||||||
QLabel *m_additionalSummaryLabel;
|
QLabel *m_additionalSummaryLabel;
|
||||||
Utils::FadingPanel *m_toolWidget;
|
FadingPanel *m_toolWidget;
|
||||||
QWidget *m_widget;
|
QWidget *m_widget;
|
||||||
|
|
||||||
QPixmap m_collapsedPixmap;
|
QPixmap m_collapsedPixmap;
|
||||||
@@ -375,7 +375,7 @@ void DetailsWidget::setWidget(QWidget *widget)
|
|||||||
d->updateControls();
|
d->updateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetailsWidget::setToolWidget(Utils::FadingPanel *widget)
|
void DetailsWidget::setToolWidget(FadingPanel *widget)
|
||||||
{
|
{
|
||||||
if (d->m_toolWidget == widget)
|
if (d->m_toolWidget == widget)
|
||||||
return;
|
return;
|
||||||
|
@@ -73,7 +73,7 @@ public:
|
|||||||
QWidget *widget() const;
|
QWidget *widget() const;
|
||||||
QWidget *takeWidget();
|
QWidget *takeWidget();
|
||||||
|
|
||||||
void setToolWidget(Utils::FadingPanel *widget);
|
void setToolWidget(FadingPanel *widget);
|
||||||
QWidget *toolWidget() const;
|
QWidget *toolWidget() const;
|
||||||
|
|
||||||
void setSummaryFontBold(bool b);
|
void setSummaryFontBold(bool b);
|
||||||
|
@@ -373,23 +373,23 @@ QList<EnvironmentItem> Environment::diff(const Environment &other) const
|
|||||||
QList<EnvironmentItem> result;
|
QList<EnvironmentItem> result;
|
||||||
while (thisIt != constEnd() || otherIt != other.constEnd()) {
|
while (thisIt != constEnd() || otherIt != other.constEnd()) {
|
||||||
if (thisIt == constEnd()) {
|
if (thisIt == constEnd()) {
|
||||||
result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
|
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
|
||||||
++otherIt;
|
++otherIt;
|
||||||
} else if (otherIt == constEnd()) {
|
} else if (otherIt == constEnd()) {
|
||||||
Utils::EnvironmentItem item(thisIt.key(), QString());
|
EnvironmentItem item(thisIt.key(), QString());
|
||||||
item.unset = true;
|
item.unset = true;
|
||||||
result.append(item);
|
result.append(item);
|
||||||
++thisIt;
|
++thisIt;
|
||||||
} else if (thisIt.key() < otherIt.key()) {
|
} else if (thisIt.key() < otherIt.key()) {
|
||||||
Utils::EnvironmentItem item(thisIt.key(), QString());
|
EnvironmentItem item(thisIt.key(), QString());
|
||||||
item.unset = true;
|
item.unset = true;
|
||||||
result.append(item);
|
result.append(item);
|
||||||
++thisIt;
|
++thisIt;
|
||||||
} else if (thisIt.key() > otherIt.key()) {
|
} else if (thisIt.key() > otherIt.key()) {
|
||||||
result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
|
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
|
||||||
++otherIt;
|
++otherIt;
|
||||||
} else {
|
} else {
|
||||||
result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
|
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
|
||||||
++otherIt;
|
++otherIt;
|
||||||
++thisIt;
|
++thisIt;
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@ public:
|
|||||||
m_resultEnvironment.modify(m_items);
|
m_resultEnvironment.modify(m_items);
|
||||||
// Add removed variables again and mark them as "<UNSET>" so
|
// Add removed variables again and mark them as "<UNSET>" so
|
||||||
// that the user can actually see those removals:
|
// that the user can actually see those removals:
|
||||||
foreach (const Utils::EnvironmentItem &item, m_items) {
|
foreach (const EnvironmentItem &item, m_items) {
|
||||||
if (item.unset)
|
if (item.unset)
|
||||||
m_resultEnvironment.set(item.name, EnvironmentModel::tr("<UNSET>"));
|
m_resultEnvironment.set(item.name, EnvironmentModel::tr("<UNSET>"));
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
int findInResultInsertPosition(const QString &name) const
|
int findInResultInsertPosition(const QString &name) const
|
||||||
{
|
{
|
||||||
Utils::Environment::const_iterator it;
|
Environment::const_iterator it;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
||||||
if (m_resultEnvironment.key(it) > name)
|
if (m_resultEnvironment.key(it) > name)
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
|
|
||||||
int findInResult(const QString &name) const
|
int findInResult(const QString &name) const
|
||||||
{
|
{
|
||||||
Utils::Environment::const_iterator it;
|
Environment::const_iterator it;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
||||||
if (m_resultEnvironment.key(it) == name)
|
if (m_resultEnvironment.key(it) == name)
|
||||||
@@ -81,9 +81,9 @@ public:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::Environment m_baseEnvironment;
|
Environment m_baseEnvironment;
|
||||||
Utils::Environment m_resultEnvironment;
|
Environment m_resultEnvironment;
|
||||||
QList<Utils::EnvironmentItem> m_items;
|
QList<EnvironmentItem> m_items;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -103,7 +103,7 @@ QString EnvironmentModel::indexToVariable(const QModelIndex &index) const
|
|||||||
return d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row());
|
return d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvironmentModel::setBaseEnvironment(const Utils::Environment &env)
|
void EnvironmentModel::setBaseEnvironment(const Environment &env)
|
||||||
{
|
{
|
||||||
if (d->m_baseEnvironment == env)
|
if (d->m_baseEnvironment == env)
|
||||||
return;
|
return;
|
||||||
@@ -215,7 +215,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
if (d->m_resultEnvironment.hasKey(newName) || newName.isEmpty())
|
if (d->m_resultEnvironment.hasKey(newName) || newName.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Utils::EnvironmentItem newVariable(newName, oldValue);
|
EnvironmentItem newVariable(newName, oldValue);
|
||||||
|
|
||||||
if (changesPos != -1)
|
if (changesPos != -1)
|
||||||
resetVariable(oldName); // restore the original base variable again
|
resetVariable(oldName); // restore the original base variable again
|
||||||
@@ -238,7 +238,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Add a new change item:
|
// Add a new change item:
|
||||||
d->m_items.append(Utils::EnvironmentItem(oldName, stringValue));
|
d->m_items.append(EnvironmentItem(oldName, stringValue));
|
||||||
}
|
}
|
||||||
d->updateResultEnvironment();
|
d->updateResultEnvironment();
|
||||||
emit dataChanged(index, index);
|
emit dataChanged(index, index);
|
||||||
@@ -251,12 +251,12 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
QModelIndex EnvironmentModel::addVariable()
|
QModelIndex EnvironmentModel::addVariable()
|
||||||
{
|
{
|
||||||
//: Name when inserting a new variable
|
//: Name when inserting a new variable
|
||||||
return addVariable(Utils::EnvironmentItem(tr("<VARIABLE>"),
|
return addVariable(EnvironmentItem(tr("<VARIABLE>"),
|
||||||
//: Value when inserting a new variable
|
//: Value when inserting a new variable
|
||||||
tr("<VALUE>")));
|
tr("<VALUE>")));
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex EnvironmentModel::addVariable(const Utils::EnvironmentItem &item)
|
QModelIndex EnvironmentModel::addVariable(const EnvironmentItem &item)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Return existing index if the name is already in the result set:
|
// Return existing index if the name is already in the result set:
|
||||||
@@ -331,7 +331,7 @@ void EnvironmentModel::unsetVariable(const QString &name)
|
|||||||
emit userChangesChanged();
|
emit userChangesChanged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Utils::EnvironmentItem item(name, QString());
|
EnvironmentItem item(name, QString());
|
||||||
item.unset = true;
|
item.unset = true;
|
||||||
d->m_items.append(item);
|
d->m_items.append(item);
|
||||||
d->updateResultEnvironment();
|
d->updateResultEnvironment();
|
||||||
@@ -353,12 +353,12 @@ bool EnvironmentModel::canReset(const QString &name)
|
|||||||
return d->m_baseEnvironment.hasKey(name);
|
return d->m_baseEnvironment.hasKey(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Utils::EnvironmentItem> EnvironmentModel::userChanges() const
|
QList<EnvironmentItem> EnvironmentModel::userChanges() const
|
||||||
{
|
{
|
||||||
return d->m_items;
|
return d->m_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvironmentModel::setUserChanges(QList<Utils::EnvironmentItem> list)
|
void EnvironmentModel::setUserChanges(QList<EnvironmentItem> list)
|
||||||
{
|
{
|
||||||
// We assume nobody is reordering the items here.
|
// We assume nobody is reordering the items here.
|
||||||
if (list == d->m_items)
|
if (list == d->m_items)
|
||||||
|
@@ -56,7 +56,7 @@ public:
|
|||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
|
|
||||||
QModelIndex addVariable();
|
QModelIndex addVariable();
|
||||||
QModelIndex addVariable(const Utils::EnvironmentItem &item);
|
QModelIndex addVariable(const EnvironmentItem &item);
|
||||||
void resetVariable(const QString &name);
|
void resetVariable(const QString &name);
|
||||||
void unsetVariable(const QString &name);
|
void unsetVariable(const QString &name);
|
||||||
bool canUnset(const QString &name);
|
bool canUnset(const QString &name);
|
||||||
@@ -64,9 +64,9 @@ public:
|
|||||||
QString indexToVariable(const QModelIndex &index) const;
|
QString indexToVariable(const QModelIndex &index) const;
|
||||||
QModelIndex variableToIndex(const QString &name) const;
|
QModelIndex variableToIndex(const QString &name) const;
|
||||||
bool changes(const QString &key) const;
|
bool changes(const QString &key) const;
|
||||||
void setBaseEnvironment(const Utils::Environment &env);
|
void setBaseEnvironment(const Environment &env);
|
||||||
QList<Utils::EnvironmentItem> userChanges() const;
|
QList<EnvironmentItem> userChanges() const;
|
||||||
void setUserChanges(QList<Utils::EnvironmentItem> list);
|
void setUserChanges(QList<EnvironmentItem> list);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void userChangesChanged();
|
void userChangesChanged();
|
||||||
|
@@ -177,7 +177,7 @@ private:
|
|||||||
|
|
||||||
void updateMargins();
|
void updateMargins();
|
||||||
void updateButtonPositions();
|
void updateButtonPositions();
|
||||||
friend class Utils::FancyLineEditPrivate;
|
friend class FancyLineEditPrivate;
|
||||||
|
|
||||||
FancyLineEditPrivate *d;
|
FancyLineEditPrivate *d;
|
||||||
};
|
};
|
||||||
|
@@ -644,7 +644,7 @@ bool FileName::isChildOf(const FileName &s) const
|
|||||||
/// \overload
|
/// \overload
|
||||||
bool FileName::isChildOf(const QDir &dir) const
|
bool FileName::isChildOf(const QDir &dir) const
|
||||||
{
|
{
|
||||||
return isChildOf(Utils::FileName::fromString(dir.absolutePath()));
|
return isChildOf(FileName::fromString(dir.absolutePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \returns whether FileName endsWith \a s
|
/// \returns whether FileName endsWith \a s
|
||||||
@@ -659,7 +659,7 @@ bool FileName::endsWith(const QString &s) const
|
|||||||
FileName FileName::relativeChildPath(const FileName &parent) const
|
FileName FileName::relativeChildPath(const FileName &parent) const
|
||||||
{
|
{
|
||||||
if (!isChildOf(parent))
|
if (!isChildOf(parent))
|
||||||
return Utils::FileName();
|
return FileName();
|
||||||
return FileName(QString::mid(parent.size() + 1, -1));
|
return FileName(QString::mid(parent.size() + 1, -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -80,10 +80,10 @@ public:
|
|||||||
bool isChildOf(const QDir &dir) const;
|
bool isChildOf(const QDir &dir) const;
|
||||||
bool endsWith(const QString &s) const;
|
bool endsWith(const QString &s) const;
|
||||||
|
|
||||||
Utils::FileName relativeChildPath(const FileName &parent) const;
|
FileName relativeChildPath(const FileName &parent) const;
|
||||||
Utils::FileName &appendPath(const QString &s);
|
FileName &appendPath(const QString &s);
|
||||||
Utils::FileName &appendString(const QString &str);
|
FileName &appendString(const QString &str);
|
||||||
Utils::FileName &appendString(QChar str);
|
FileName &appendString(QChar str);
|
||||||
|
|
||||||
using QString::size;
|
using QString::size;
|
||||||
using QString::count;
|
using QString::count;
|
||||||
|
@@ -69,7 +69,7 @@ FileWizardPage::FileWizardPage(QWidget *parent) :
|
|||||||
connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
|
connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
|
||||||
connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
|
connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
|
||||||
|
|
||||||
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Location"));
|
setProperty(SHORT_TITLE_PROPERTY, tr("Location"));
|
||||||
}
|
}
|
||||||
|
|
||||||
FileWizardPage::~FileWizardPage()
|
FileWizardPage::~FileWizardPage()
|
||||||
|
@@ -90,7 +90,7 @@ bool IpAddressLineEdit::validate(const QString &value, QString *errorMessage) co
|
|||||||
|
|
||||||
void IpAddressLineEdit::handleChanged(const QString &t)
|
void IpAddressLineEdit::handleChanged(const QString &t)
|
||||||
{
|
{
|
||||||
Utils::FancyLineEdit::handleChanged(t);
|
FancyLineEdit::handleChanged(t);
|
||||||
if (isValid())
|
if (isValid())
|
||||||
emit validAddressChanged(t);
|
emit validAddressChanged(t);
|
||||||
else
|
else
|
||||||
|
@@ -36,7 +36,7 @@ namespace Utils {
|
|||||||
|
|
||||||
class IpAddressLineEditPrivate;
|
class IpAddressLineEditPrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT IpAddressLineEdit : public Utils::FancyLineEdit
|
class QTCREATOR_UTILS_EXPORT IpAddressLineEdit : public FancyLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@@ -398,22 +398,22 @@ public:
|
|||||||
JsonSchemaManager(const QStringList &searchPaths);
|
JsonSchemaManager(const QStringList &searchPaths);
|
||||||
~JsonSchemaManager();
|
~JsonSchemaManager();
|
||||||
|
|
||||||
Utils::JsonSchema *schemaForFile(const QString &fileName) const;
|
JsonSchema *schemaForFile(const QString &fileName) const;
|
||||||
Utils::JsonSchema *schemaByName(const QString &baseName) const;
|
JsonSchema *schemaByName(const QString &baseName) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct JsonSchemaData
|
struct JsonSchemaData
|
||||||
{
|
{
|
||||||
JsonSchemaData(const QString &absoluteFileName, Utils::JsonSchema *schema = 0)
|
JsonSchemaData(const QString &absoluteFileName, JsonSchema *schema = 0)
|
||||||
: m_absoluteFileName(absoluteFileName)
|
: m_absoluteFileName(absoluteFileName)
|
||||||
, m_schema(schema)
|
, m_schema(schema)
|
||||||
{}
|
{}
|
||||||
QString m_absoluteFileName;
|
QString m_absoluteFileName;
|
||||||
Utils::JsonSchema *m_schema;
|
JsonSchema *m_schema;
|
||||||
QDateTime m_lastParseAttempt;
|
QDateTime m_lastParseAttempt;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils::JsonSchema *parseSchema(const QString &schemaFileName) const;
|
JsonSchema *parseSchema(const QString &schemaFileName) const;
|
||||||
|
|
||||||
QStringList m_searchPaths;
|
QStringList m_searchPaths;
|
||||||
mutable QHash<QString, JsonSchemaData> m_schemas;
|
mutable QHash<QString, JsonSchemaData> m_schemas;
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT NavigationTreeView : public Utils::TreeView
|
class QTCREATOR_UTILS_EXPORT NavigationTreeView : public TreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@@ -148,7 +148,7 @@ QString BinaryVersionToolTipEventFilter::toolVersion(const QString &binary, cons
|
|||||||
if (!proc.waitForStarted())
|
if (!proc.waitForStarted())
|
||||||
return QString();
|
return QString();
|
||||||
if (!proc.waitForFinished()) {
|
if (!proc.waitForFinished()) {
|
||||||
Utils::SynchronousProcess::stopProcess(proc);
|
SynchronousProcess::stopProcess(proc);
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
return QString::fromLocal8Bit(QByteArray(proc.readAllStandardOutput()
|
return QString::fromLocal8Bit(QByteArray(proc.readAllStandardOutput()
|
||||||
@@ -271,7 +271,7 @@ void PathChooser::insertButton(int index, const QString &text, QObject *receiver
|
|||||||
d->m_buttons.insert(index, button);
|
d->m_buttons.insert(index, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Utils::PathChooser::browseButtonLabel()
|
QString PathChooser::browseButtonLabel()
|
||||||
{
|
{
|
||||||
return HostOsInfo::isMacHost() ? tr("Choose...") : tr("Browse...");
|
return HostOsInfo::isMacHost() ? tr("Choose...") : tr("Browse...");
|
||||||
}
|
}
|
||||||
@@ -296,7 +296,7 @@ void PathChooser::setBaseDirectory(const QString &directory)
|
|||||||
|
|
||||||
FileName PathChooser::baseFileName() const
|
FileName PathChooser::baseFileName() const
|
||||||
{
|
{
|
||||||
return Utils::FileName::fromString(d->m_baseDirectory);
|
return FileName::fromString(d->m_baseDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setBaseFileName(const FileName &base)
|
void PathChooser::setBaseFileName(const FileName &base)
|
||||||
@@ -305,7 +305,7 @@ void PathChooser::setBaseFileName(const FileName &base)
|
|||||||
triggerChanged();
|
triggerChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setEnvironment(const Utils::Environment &env)
|
void PathChooser::setEnvironment(const Environment &env)
|
||||||
{
|
{
|
||||||
QString oldExpand = path();
|
QString oldExpand = path();
|
||||||
d->m_environment = env;
|
d->m_environment = env;
|
||||||
@@ -327,7 +327,7 @@ QString PathChooser::rawPath() const
|
|||||||
|
|
||||||
FileName PathChooser::fileName() const
|
FileName PathChooser::fileName() const
|
||||||
{
|
{
|
||||||
return Utils::FileName::fromString(path());
|
return FileName::fromString(path());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setPath(const QString &path)
|
void PathChooser::setPath(const QString &path)
|
||||||
@@ -335,7 +335,7 @@ void PathChooser::setPath(const QString &path)
|
|||||||
d->m_lineEdit->setText(QDir::toNativeSeparators(path));
|
d->m_lineEdit->setText(QDir::toNativeSeparators(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setFileName(const Utils::FileName &fn)
|
void PathChooser::setFileName(const FileName &fn)
|
||||||
{
|
{
|
||||||
d->m_lineEdit->setText(fn.toUserOutput());
|
d->m_lineEdit->setText(fn.toUserOutput());
|
||||||
}
|
}
|
||||||
|
@@ -94,15 +94,15 @@ public:
|
|||||||
|
|
||||||
QString path() const;
|
QString path() const;
|
||||||
QString rawPath() const; // The raw unexpanded input.
|
QString rawPath() const; // The raw unexpanded input.
|
||||||
Utils::FileName fileName() const;
|
FileName fileName() const;
|
||||||
|
|
||||||
QString baseDirectory() const;
|
QString baseDirectory() const;
|
||||||
void setBaseDirectory(const QString &directory);
|
void setBaseDirectory(const QString &directory);
|
||||||
|
|
||||||
Utils::FileName baseFileName() const;
|
FileName baseFileName() const;
|
||||||
void setBaseFileName(const Utils::FileName &base);
|
void setBaseFileName(const FileName &base);
|
||||||
|
|
||||||
void setEnvironment(const Utils::Environment &env);
|
void setEnvironment(const Environment &env);
|
||||||
|
|
||||||
/** Returns the suggested label title when used in a form layout. */
|
/** Returns the suggested label title when used in a form layout. */
|
||||||
static QString label();
|
static QString label();
|
||||||
|
@@ -350,7 +350,7 @@ QVariantMap PersistentSettingsReader::restoreValues() const
|
|||||||
return m_valueMap;
|
return m_valueMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentSettingsReader::load(const Utils::FileName &fileName)
|
bool PersistentSettingsReader::load(const FileName &fileName)
|
||||||
{
|
{
|
||||||
m_valueMap.clear();
|
m_valueMap.clear();
|
||||||
|
|
||||||
@@ -442,7 +442,7 @@ bool PersistentSettingsWriter::write(const QVariantMap &data, QWidget *parent) c
|
|||||||
{
|
{
|
||||||
QDir tmp;
|
QDir tmp;
|
||||||
tmp.mkpath(m_fileName.toFileInfo().path());
|
tmp.mkpath(m_fileName.toFileInfo().path());
|
||||||
Utils::FileSaver saver(m_fileName.toString(), QIODevice::Text);
|
FileSaver saver(m_fileName.toString(), QIODevice::Text);
|
||||||
if (!saver.hasError()) {
|
if (!saver.hasError()) {
|
||||||
const Context ctx;
|
const Context ctx;
|
||||||
QXmlStreamWriter w(saver.file());
|
QXmlStreamWriter w(saver.file());
|
||||||
|
@@ -60,12 +60,12 @@ public:
|
|||||||
|
|
||||||
bool save(const QVariantMap &data, QWidget *parent) const;
|
bool save(const QVariantMap &data, QWidget *parent) const;
|
||||||
|
|
||||||
Utils::FileName fileName() const;
|
FileName fileName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool write(const QVariantMap &data, QWidget *parent) const;
|
bool write(const QVariantMap &data, QWidget *parent) const;
|
||||||
|
|
||||||
const Utils::FileName m_fileName;
|
const FileName m_fileName;
|
||||||
const QString m_docType;
|
const QString m_docType;
|
||||||
mutable QMap<QString, QVariant> m_savedData;
|
mutable QMap<QString, QVariant> m_savedData;
|
||||||
};
|
};
|
||||||
|
@@ -34,9 +34,9 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
using namespace Utils;
|
namespace Utils {
|
||||||
|
|
||||||
QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QString &fileName,
|
QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &fileName,
|
||||||
bool modified,
|
bool modified,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
{
|
{
|
||||||
@@ -56,7 +56,7 @@ QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QStri
|
|||||||
return reloadPrompt(title, msg, QDir::toNativeSeparators(fileName), parent);
|
return reloadPrompt(title, msg, QDir::toNativeSeparators(fileName), parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QString &title,
|
QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &title,
|
||||||
const QString &prompt,
|
const QString &prompt,
|
||||||
const QString &details,
|
const QString &details,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
@@ -84,8 +84,8 @@ QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QStri
|
|||||||
return ReloadNone;
|
return ReloadNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTCREATOR_UTILS_EXPORT Utils::FileDeletedPromptAnswer
|
QTCREATOR_UTILS_EXPORT FileDeletedPromptAnswer
|
||||||
Utils::fileDeletedPrompt(const QString &fileName, bool triggerExternally, QWidget *parent)
|
fileDeletedPrompt(const QString &fileName, bool triggerExternally, QWidget *parent)
|
||||||
{
|
{
|
||||||
const QString title = QCoreApplication::translate("Utils::fileDeletedPrompt",
|
const QString title = QCoreApplication::translate("Utils::fileDeletedPrompt",
|
||||||
"File has been removed");
|
"File has been removed");
|
||||||
@@ -127,3 +127,5 @@ QTCREATOR_UTILS_EXPORT Utils::FileDeletedPromptAnswer
|
|||||||
return FileDeletedSave;
|
return FileDeletedSave;
|
||||||
return FileDeletedClose;
|
return FileDeletedClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Utils
|
||||||
|
@@ -270,9 +270,9 @@ void TcpPortsGatherer::update(QAbstractSocket::NetworkLayerProtocol protocol)
|
|||||||
d->protocol = protocol;
|
d->protocol = protocol;
|
||||||
d->usedPorts.clear();
|
d->usedPorts.clear();
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
if (HostOsInfo::isWindowsHost())
|
||||||
d->updateWin();
|
d->updateWin();
|
||||||
else if (Utils::HostOsInfo::isLinuxHost())
|
else if (HostOsInfo::isLinuxHost())
|
||||||
d->updateLinux();
|
d->updateLinux();
|
||||||
else
|
else
|
||||||
d->updateNetstat();
|
d->updateNetstat();
|
||||||
|
@@ -213,7 +213,7 @@ TextFileFormat::ReadResult readTextFile(const QString &fileName, const QTextCode
|
|||||||
|
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
try {
|
try {
|
||||||
Utils::FileReader reader;
|
FileReader reader;
|
||||||
if (!reader.fetch(fileName, errorString))
|
if (!reader.fetch(fileName, errorString))
|
||||||
return TextFileFormat::ReadIOError;
|
return TextFileFormat::ReadIOError;
|
||||||
data = reader.data();
|
data = reader.data();
|
||||||
@@ -277,16 +277,16 @@ TextFileFormat::ReadResult TextFileFormat::readFileUTF8(const QString &fileName,
|
|||||||
{
|
{
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
try {
|
try {
|
||||||
Utils::FileReader reader;
|
FileReader reader;
|
||||||
if (!reader.fetch(fileName, errorString))
|
if (!reader.fetch(fileName, errorString))
|
||||||
return Utils::TextFileFormat::ReadIOError;
|
return TextFileFormat::ReadIOError;
|
||||||
data = reader.data();
|
data = reader.data();
|
||||||
} catch (const std::bad_alloc &) {
|
} catch (const std::bad_alloc &) {
|
||||||
*errorString = QCoreApplication::translate("Utils::TextFileFormat", "Out of memory.");
|
*errorString = QCoreApplication::translate("Utils::TextFileFormat", "Out of memory.");
|
||||||
return Utils::TextFileFormat::ReadMemoryAllocationError;
|
return TextFileFormat::ReadMemoryAllocationError;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::TextFileFormat format = Utils::TextFileFormat::detect(data);
|
TextFileFormat format = TextFileFormat::detect(data);
|
||||||
if (!format.codec)
|
if (!format.codec)
|
||||||
format.codec = defaultCodec ? defaultCodec : QTextCodec::codecForLocale();
|
format.codec = defaultCodec ? defaultCodec : QTextCodec::codecForLocale();
|
||||||
QString target;
|
QString target;
|
||||||
@@ -294,10 +294,10 @@ TextFileFormat::ReadResult TextFileFormat::readFileUTF8(const QString &fileName,
|
|||||||
if (format.hasUtf8Bom)
|
if (format.hasUtf8Bom)
|
||||||
data.remove(0, 3);
|
data.remove(0, 3);
|
||||||
*plainText = data;
|
*plainText = data;
|
||||||
return Utils::TextFileFormat::ReadSuccess;
|
return TextFileFormat::ReadSuccess;
|
||||||
}
|
}
|
||||||
*plainText = target.toUtf8();
|
*plainText = target.toUtf8();
|
||||||
return Utils::TextFileFormat::ReadSuccess;
|
return TextFileFormat::ReadSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -318,7 +318,7 @@ bool TextFileFormat::writeFile(const QString &fileName, QString plainText, QStri
|
|||||||
plainText.replace(QLatin1Char('\n'), QLatin1String("\r\n"));
|
plainText.replace(QLatin1Char('\n'), QLatin1String("\r\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FileSaver saver(fileName, fileMode);
|
FileSaver saver(fileName, fileMode);
|
||||||
if (!saver.hasError()) {
|
if (!saver.hasError()) {
|
||||||
if (hasUtf8Bom && codec->name() == "UTF-8")
|
if (hasUtf8Bom && codec->name() == "UTF-8")
|
||||||
saver.write("\xef\xbb\xbf", 3);
|
saver.write("\xef\xbb\xbf", 3);
|
||||||
|
@@ -51,7 +51,7 @@ inline int screenNumber(const QPoint &pos, QWidget *w)
|
|||||||
|
|
||||||
inline QRect screenGeometry(const QPoint &pos, QWidget *w)
|
inline QRect screenGeometry(const QPoint &pos, QWidget *w)
|
||||||
{
|
{
|
||||||
if (Utils::HostOsInfo::isMacHost())
|
if (HostOsInfo::isMacHost())
|
||||||
return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
|
return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
|
||||||
return QApplication::desktop()->screenGeometry(screenNumber(pos, w));
|
return QApplication::desktop()->screenGeometry(screenNumber(pos, w));
|
||||||
}
|
}
|
||||||
|
@@ -72,7 +72,7 @@ QTipLabel::QTipLabel(QWidget *parent) :
|
|||||||
|
|
||||||
QTipLabel::~QTipLabel()
|
QTipLabel::~QTipLabel()
|
||||||
{
|
{
|
||||||
Utils::TipContent *tmpTipContent = m_tipContent;
|
TipContent *tmpTipContent = m_tipContent;
|
||||||
m_tipContent = 0;
|
m_tipContent = 0;
|
||||||
delete tmpTipContent;
|
delete tmpTipContent;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ bool QTipLabel::isInteractive() const
|
|||||||
|
|
||||||
void QTipLabel::setContent(const TipContent &content)
|
void QTipLabel::setContent(const TipContent &content)
|
||||||
{
|
{
|
||||||
Utils::TipContent *tmpTipContent = m_tipContent;
|
TipContent *tmpTipContent = m_tipContent;
|
||||||
m_tipContent = content.clone();
|
m_tipContent = content.clone();
|
||||||
delete tmpTipContent;
|
delete tmpTipContent;
|
||||||
}
|
}
|
||||||
|
@@ -53,16 +53,16 @@ protected:
|
|||||||
public:
|
public:
|
||||||
virtual ~QTipLabel();
|
virtual ~QTipLabel();
|
||||||
|
|
||||||
void setContent(const Utils::TipContent &content);
|
void setContent(const TipContent &content);
|
||||||
const Utils::TipContent &content() const;
|
const TipContent &content() const;
|
||||||
|
|
||||||
virtual void configure(const QPoint &pos, QWidget *w) = 0;
|
virtual void configure(const QPoint &pos, QWidget *w) = 0;
|
||||||
virtual bool canHandleContentReplacement(const Utils::TipContent &content) const = 0;
|
virtual bool canHandleContentReplacement(const TipContent &content) const = 0;
|
||||||
|
|
||||||
bool isInteractive() const;
|
bool isInteractive() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Utils::TipContent *m_tipContent;
|
TipContent *m_tipContent;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ColorTip : public QTipLabel
|
class ColorTip : public QTipLabel
|
||||||
|
@@ -222,7 +222,7 @@ void ToolTip::placeTip(const QPoint &pos, QWidget *w)
|
|||||||
{
|
{
|
||||||
QRect screen = Internal::screenGeometry(pos, w);
|
QRect screen = Internal::screenGeometry(pos, w);
|
||||||
QPoint p = pos;
|
QPoint p = pos;
|
||||||
p += QPoint(2, Utils::HostOsInfo::isWindowsHost() ? 21 : 16);
|
p += QPoint(2, HostOsInfo::isWindowsHost() ? 21 : 16);
|
||||||
if (p.x() + m_tip->width() > screen.x() + screen.width())
|
if (p.x() + m_tip->width() > screen.x() + screen.width())
|
||||||
p.rx() -= 4 + m_tip->width();
|
p.rx() -= 4 + m_tip->width();
|
||||||
if (p.y() + m_tip->height() > screen.y() + screen.height())
|
if (p.y() + m_tip->height() > screen.y() + screen.height())
|
||||||
|
@@ -326,7 +326,7 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
|
|||||||
setOption(QWizard::NoBackButtonOnStartPage, true);
|
setOption(QWizard::NoBackButtonOnStartPage, true);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isMacHost()) {
|
if (HostOsInfo::isMacHost()) {
|
||||||
setButtonLayout(QList<QWizard::WizardButton>()
|
setButtonLayout(QList<QWizard::WizardButton>()
|
||||||
<< QWizard::CancelButton
|
<< QWizard::CancelButton
|
||||||
<< QWizard::Stretch
|
<< QWizard::Stretch
|
||||||
|
Reference in New Issue
Block a user