diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index cb5257b01c5..67cd292cd2f 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -11022,6 +11022,24 @@ switch to the nfs-kernel-server, or create a symlink so that the settings are stored locally. + \o The Okteta KDE custom widget plugin might be installed as part of + some Linux distributions. It can cause Qt Designer to crash. For + more information, see: + + \list + + \o \l{https://bugs.launchpad.net/ubuntu/+source/kdeutils/+bug/662005}{Ubuntu bug 662005} + \o \l{http://bugreports.qt.nokia.com/browse/QTBUG-12025}{QTBUG-12025} + + \endlist + + To resolve the issue, enter the following command to remove the package: + \code + sudo apt-get remove okteta + \endcode + Or delete the following file: + \c /usr/lib/kde4/plugins/designer/oktetadesignerplugin.so. + \endlist \section1 Editing Issues diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index c02fc9b8436..923d6a79241 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -9544,6 +9544,10 @@ S60 emulator run configuration default display name, %1 is base pro-File name<b>qmake:</b> %1 %2 <b>qmake:</b> %1 %2 + + Might make the application vulnerable. Use only in a safe environment. + Kann die Anwendung angreifbar machen. Verwenden sie diese Option nur in sicherer Umgebung. + Qt4ProjectManager::Qt4Manager diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index a5a8d779966..1f890406df8 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -21045,6 +21045,10 @@ Check if the phone is connected and App TRK is running. <b>qmake:</b> %1 %2 <b>qmake:</b> %1 %2 + + Might make the application vulnerable. Use only in a safe environment. + Может сделать приложение уязвимым. Используйте только в безопасных системах. + Qt4ProjectManager::QmlDebuggingLibrary diff --git a/src/libs/utils/abstractprocess_win.cpp b/src/libs/utils/abstractprocess_win.cpp index 194c67e222c..4bc7c089529 100644 --- a/src/libs/utils/abstractprocess_win.cpp +++ b/src/libs/utils/abstractprocess_win.cpp @@ -81,7 +81,10 @@ static QString quoteWinArgument(const QString &arg) // The argument must not end with a \ since this would be interpreted // as escaping the quote -- rather put the \ behind the quote: e.g. // rather use "foo"\ than "foo\" - ret.replace(QRegExp(QLatin1String("(\\\\*)$")), QLatin1String("\"\\1")); + int i = ret.length(); + while (i > 0 && ret.at(i - 1) == QLatin1Char('\\')) + --i; + ret.insert(i, QLatin1Char('"')); ret.prepend(QLatin1Char('"')); } return ret; diff --git a/src/libs/utils/winutils.cpp b/src/libs/utils/winutils.cpp index 7ed6909f2f1..f19bdfefbe4 100644 --- a/src/libs/utils/winutils.cpp +++ b/src/libs/utils/winutils.cpp @@ -163,6 +163,19 @@ QTCREATOR_UTILS_EXPORT QString getLongPathName(const QString &name) return rc; } +// makes sure that capitalization of directories is canonical. +// This mimics the logic in QDeclarative_isFileCaseCorrect +QTCREATOR_UTILS_EXPORT QString normalizePathName(const QString &name) +{ + QString canonicalName = getShortPathName(name); + if (canonicalName.isEmpty()) + return name; + canonicalName = getLongPathName(canonicalName); + if (canonicalName.isEmpty()) + return name; + return canonicalName; +} + QTCREATOR_UTILS_EXPORT unsigned long winQPidToPid(const Q_PID qpid) { const PROCESS_INFORMATION *processInfo = reinterpret_cast(qpid); diff --git a/src/libs/utils/winutils.h b/src/libs/utils/winutils.h index 92ca1f15783..caf9f9476a5 100644 --- a/src/libs/utils/winutils.h +++ b/src/libs/utils/winutils.h @@ -59,6 +59,9 @@ QTCREATOR_UTILS_EXPORT QString getShortPathName(const QString &name); // Returns long name QTCREATOR_UTILS_EXPORT QString getLongPathName(const QString &name); +// Returns long name with canonical capitalization. +QTCREATOR_UTILS_EXPORT QString normalizePathName(const QString &name); + QTCREATOR_UTILS_EXPORT unsigned long winQPidToPid(const Q_PID qpid); QTCREATOR_UTILS_EXPORT bool winIs64BitSystem(); diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index 829b9608540..603eef40c53 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -217,12 +217,6 @@ bool CommonOptionsPage::matches(const QString &s) const // /////////////////////////////////////////////////////////////////////// -static bool oxygenStyle() -{ - const ManhattanStyle *ms = qobject_cast(qApp->style()); - return ms && !qstrcmp("OxygenStyle", ms->baseStyle()->metaObject()->className()); -} - QString DebuggingHelperOptionPage::id() const { return _("Z.DebuggingHelper"); @@ -263,28 +257,16 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent) QWidget *w = new QWidget(parent); m_ui.setupUi(w); - m_ui.dumperLocationChooser->setExpectedKind(Utils::PathChooser::Command); - m_ui.dumperLocationChooser->setPromptDialogTitle(QCoreApplication::translate - ("Debugger", "Choose DebuggingHelper Location")); - m_ui.dumperLocationChooser->setInitialBrowsePathBackup( - ICore::instance()->resourcePath() + "../../lib"); - m_group.clear(); DebuggerCore *dc = debuggerCore(); m_group.insert(dc->action(UseDebuggingHelpers), m_ui.debuggingHelperGroupBox); - m_group.insert(dc->action(UseCustomDebuggingHelperLocation), - m_ui.customLocationGroupBox); - // Suppress Oxygen style's giving flat group boxes bold titles. - if (oxygenStyle()) - m_ui.customLocationGroupBox->setStyleSheet(_("QGroupBox::title { font: ; }")); - - m_group.insert(dc->action(CustomDebuggingHelperLocation), - m_ui.dumperLocationChooser); m_group.insert(dc->action(UseCodeModel), m_ui.checkBoxUseCodeModel); + m_ui.checkBoxUseCodeModel->setToolTip(dc->action(UseCodeModel)->toolTip()); + m_group.insert(dc->action(ShowThreadNames), m_ui.checkBoxShowThreadNames); @@ -302,8 +284,6 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent) if (m_searchKeywords.isEmpty()) { QTextStream(&m_searchKeywords) << ' ' << m_ui.debuggingHelperGroupBox->title() - << ' ' << m_ui.customLocationGroupBox->title() - << ' ' << m_ui.dumperLocationLabel->text() << ' ' << m_ui.checkBoxUseCodeModel->text() << ' ' << m_ui.checkBoxShowThreadNames->text(); m_searchKeywords.remove(QLatin1Char('&')); diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index f10cbb393f7..134434dacb0 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -265,20 +265,6 @@ DebuggerSettings::DebuggerSettings(QSettings *settings) item->setValue(true); insertItem(UseDebuggingHelpers, item); - item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseCustomDebuggingHelperLocation")); - item->setCheckable(true); - item->setDefaultValue(false); - item->setValue(false); - insertItem(UseCustomDebuggingHelperLocation, item); - - item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("CustomDebuggingHelperLocation")); - item->setCheckable(true); - item->setDefaultValue(QString()); - item->setValue(QString()); - insertItem(CustomDebuggingHelperLocation, item); - item = new SavedAction(this); item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel")); item->setText(tr("Use Code Model")); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index c59e22939c2..c3f5ae65f93 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -101,8 +101,6 @@ enum DebuggerActionCode SwitchModeOnExit, UseDebuggingHelpers, - UseCustomDebuggingHelperLocation, - CustomDebuggingHelperLocation, UseCodeModel, ShowThreadNames, diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index bccd97939a7..50f7de2a622 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -633,13 +633,6 @@ bool DebuggerEngine::qtDumperLibraryEnabled() const QStringList DebuggerEngine::qtDumperLibraryLocations() const { - if (debuggerCore()->action(UseCustomDebuggingHelperLocation)->value().toBool()) { - const QString customLocation = - debuggerCore()->action(CustomDebuggingHelperLocation)->value().toString(); - const QString location = - tr("%1 (explicitly set in the Debugger Options)").arg(customLocation); - return QStringList(location); - } return d->m_startParameters.dumperLibraryLocations; } @@ -650,8 +643,6 @@ void DebuggerEngine::showQtDumperLibraryWarning(const QString &details) QString DebuggerEngine::qtDumperLibraryName() const { - if (debuggerCore()->action(UseCustomDebuggingHelperLocation)->value().toBool()) - return debuggerCore()->action(CustomDebuggingHelperLocation)->value().toString(); return startParameters().dumperLibrary; } diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index ecce430af01..6ea4763db38 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -47,6 +47,7 @@ #ifdef Q_OS_WIN # include "peutils.h" +# include #endif #include @@ -686,6 +687,12 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu sp.startMode = StartInternal; sp.environment = rc->environment(); sp.workingDirectory = rc->workingDirectory(); + +#if defined(Q_OS_WIN) + // Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...) + sp.workingDirectory = Utils::normalizePathName(sp.workingDirectory); +#endif + sp.executable = rc->executable(); sp.processArgs = rc->commandLineArguments(); sp.toolChainAbi = rc->abi(); diff --git a/src/plugins/debugger/dumperoptionpage.ui b/src/plugins/debugger/dumperoptionpage.ui index 3dcf2478167..ff71eb9f697 100644 --- a/src/plugins/debugger/dumperoptionpage.ui +++ b/src/plugins/debugger/dumperoptionpage.ui @@ -50,31 +50,6 @@ true - - - - Use debugging helper from custom location - - - true - - - true - - - - - - Location: - - - - - - - - - diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index 888a0b47d25..f0d9826a835 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -668,7 +668,7 @@ void QmlCppEngine::handleRemoteSetupFailed(const QString &message) void QmlCppEngine::showMessage(const QString &msg, int channel, int timeout) const { - if (channel == AppOutput || channel == AppError) { + if (channel == AppOutput || channel == AppError || channel == AppStuff) { // message is from CppEngine, allow qml engine to process d->m_qmlEngine->filterApplicationMessage(msg, channel); } diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index c3f6d377bad..8a4e680b0a4 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -1048,7 +1048,11 @@ QString QmlEngine::mangleFilenamePaths(const QString &filename, QFileInfo fileInfo(filename); if (oldBaseDir.exists() && newBaseDir.exists() && fileInfo.exists()) { - if (fileInfo.absoluteFilePath().startsWith(oldBaseDir.canonicalPath())) { + Qt::CaseSensitivity caseSensitive = Qt::CaseSensitive; +#ifdef Q_OS_WIN + caseSensitive = Qt::CaseInsensitive; +#endif + if (fileInfo.absoluteFilePath().startsWith(oldBaseDir.canonicalPath(), caseSensitive)) { QString fileRelativePath = fileInfo.canonicalFilePath().mid(oldBaseDir.canonicalPath().length()); QFileInfo projectFile(newBaseDir.canonicalPath() + QLatin1Char('/') + fileRelativePath); diff --git a/src/plugins/projectexplorer/applicationlauncher_win.cpp b/src/plugins/projectexplorer/applicationlauncher_win.cpp index 7c9364308b8..2576d352351 100644 --- a/src/plugins/projectexplorer/applicationlauncher_win.cpp +++ b/src/plugins/projectexplorer/applicationlauncher_win.cpp @@ -71,10 +71,7 @@ ApplicationLauncher::~ApplicationLauncher() void ApplicationLauncher::setWorkingDirectory(const QString &dir) { // Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...) - QString fixedPath = dir; - const QString longPath = Utils::getLongPathName(dir); - if (!longPath.isEmpty()) - fixedPath = longPath; + const QString fixedPath = Utils::normalizePathName(dir); d->m_winGuiProcess.setWorkingDirectory(fixedPath); d->m_consoleProcess.setWorkingDirectory(fixedPath); diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index c1b87cc94a1..35f81dc8b0a 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -505,8 +505,6 @@ bool Target::fromMap(const QVariantMap &map) if (i == activeConfiguration) setActiveDeployConfiguration(dc); } - if (deployConfigurations().isEmpty() && d->deployFactories().isEmpty()) - return false; int rcCount = map.value(QLatin1String(RC_COUNT_KEY), 0).toInt(&ok); if (!ok || rcCount < 0) diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserver.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserver.cpp index 43849c096df..3d256b697a6 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserver.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserver.cpp @@ -865,6 +865,11 @@ InformationChangedCommand NodeInstanceServer::createAllInformationChangedCommand return InformationChangedCommand(informationVector); } +static bool supportedVariantType(QVariant::Type type) +{ + return type < QVariant::UserType && type != QVariant::Icon; +} + ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList &instanceList) const { QVector valueVector; @@ -872,7 +877,7 @@ ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList< foreach(const ServerNodeInstance &instance, instanceList) { foreach(const QString &propertyName, instance.propertyNames()) { QVariant propertyValue = instance.property(propertyName); - if (propertyValue.type() < QVariant::UserType) + if (supportedVariantType(propertyValue.type())) valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString())); } } @@ -901,7 +906,7 @@ ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QVecto if( instance.isValid()) { QVariant propertyValue = instance.property(propertyName); - if (propertyValue.type() < QVariant::UserType) + if (supportedVariantType(propertyValue.type())) valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString())); } } diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 6f7da331ce8..63150230e4d 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -45,7 +45,7 @@ #include #include -#ifdef Q_OS_WIN32 +#ifdef Q_OS_WIN #include #endif @@ -180,20 +180,13 @@ void QmlProjectRunConfiguration::setQtVersionId(int id) } /* QtDeclarative checks explicitly that the capitalization for any URL / path - is exactly like the capitalization on disk. This method is uses the same - native Windows API's to get the exact canonical path. */ + is exactly like the capitalization on disk.*/ QString QmlProjectRunConfiguration::canonicalCapsPath(const QString &fileName) { QString canonicalPath = QFileInfo(fileName).canonicalFilePath(); -#if defined(Q_OS_WIN32) - // don't know whether the shortpath step is really needed, - // but we do this in QtDeclarative too. - QString path = Utils::getShortPathName(canonicalPath); - if (!path.isEmpty()) - path = Utils::getLongPathName(canonicalPath); - if (!path.isEmpty()) - canonicalPath = path; +#if defined(Q_OS_WIN) + canonicalPath = Utils::normalizePathName(canonicalPath); #endif return canonicalPath; diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index d2763af08e2..c59b4a62bd1 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -620,7 +620,7 @@ void QMakeStepConfigWidget::updateQmlDebuggingWarningsLabel() if (m_step->linkQmlDebuggingLibrary()) { if (m_step->isQmlDebuggingLibrarySupported()) { - m_ui.qmlDebuggingWarningText->setText("Might make your application vulnerable. Only use in a safe environment!"); + m_ui.qmlDebuggingWarningText->setText(tr("Might make the application vulnerable. Use only in a safe environment.")); } } diff --git a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h index 62c97cb2c46..c676ee0587b 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h +++ b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h @@ -196,7 +196,7 @@ public: virtual bool allowsRemoteMounts() const { return false; } virtual bool allowsPackagingDisabling() const { return false; } - virtual bool allowsQmlDebugging() const { return true; } + virtual bool allowsQmlDebugging() const { return false; } virtual QString projectVersion(QString *error = 0) const; virtual QString packageName() const; @@ -258,7 +258,7 @@ public: virtual bool allowsRemoteMounts() const { return false; } virtual bool allowsPackagingDisabling() const { return false; } - virtual bool allowsQmlDebugging() const { return true; } + virtual bool allowsQmlDebugging() const { return false; } static QString defaultDisplayName(); diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index b6117a89194..2ee537db6af 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -4276,6 +4276,7 @@ void BaseTextEditorWidget::extraAreaMouseEvent(QMouseEvent *e) if (!contextMenu->isEmpty()) contextMenu->exec(e->globalPos()); delete contextMenu; + e->accept(); } } else if (d->extraAreaSelectionAnchorBlockNumber >= 0) { QTextCursor selection = cursor;