summaryrefslogtreecommitdiffstats
path: root/src/libs/installer
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer')
-rw-r--r--src/libs/installer/addqtcreatorarrayvalueoperation.cpp6
-rw-r--r--src/libs/installer/component.cpp9
-rw-r--r--src/libs/installer/consumeoutputoperation.cpp2
-rw-r--r--src/libs/installer/createshortcutoperation.cpp2
-rw-r--r--src/libs/installer/environmentvariablesoperation.cpp2
-rw-r--r--src/libs/installer/fileutils.cpp13
-rw-r--r--src/libs/installer/fsengineclient.cpp4
-rw-r--r--src/libs/installer/init.cpp16
-rw-r--r--src/libs/installer/installer.pro21
-rw-r--r--src/libs/installer/macreplaceinstallnamesoperation.cpp4
-rw-r--r--src/libs/installer/packagemanagercore.cpp10
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp2
-rw-r--r--src/libs/installer/packagemanagergui.cpp9
-rw-r--r--src/libs/installer/persistentsettings.cpp221
-rw-r--r--src/libs/installer/persistentsettings.h84
-rw-r--r--src/libs/installer/projectexplorer_export.h1
-rw-r--r--src/libs/installer/qtcreatorpersistentsettings.cpp236
-rw-r--r--src/libs/installer/qtcreatorpersistentsettings.h88
-rw-r--r--src/libs/installer/qtpatch.cpp2
-rw-r--r--src/libs/installer/registerdefaultdebuggeroperation.cpp180
-rw-r--r--src/libs/installer/registerdefaultdebuggeroperation.h63
-rw-r--r--src/libs/installer/registerqtincreatorqnxoperation.cpp248
-rw-r--r--src/libs/installer/registerqtincreatorqnxoperation.h63
-rw-r--r--src/libs/installer/registertoolchainoperation.cpp198
-rw-r--r--src/libs/installer/registertoolchainoperation.h81
-rw-r--r--src/libs/installer/scriptengine.cpp9
-rw-r--r--src/libs/installer/setdemospathonqtoperation.cpp135
-rw-r--r--src/libs/installer/setdemospathonqtoperation.h63
-rw-r--r--src/libs/installer/setexamplespathonqtoperation.cpp136
-rw-r--r--src/libs/installer/setexamplespathonqtoperation.h63
-rw-r--r--src/libs/installer/setimportspathonqtcoreoperation.cpp162
-rw-r--r--src/libs/installer/setimportspathonqtcoreoperation.h63
-rw-r--r--src/libs/installer/setpathonqtcoreoperation.cpp186
-rw-r--r--src/libs/installer/setpathonqtcoreoperation.h63
-rw-r--r--src/libs/installer/setpluginpathonqtcoreoperation.cpp160
-rw-r--r--src/libs/installer/setpluginpathonqtcoreoperation.h63
-rw-r--r--src/libs/installer/setqtcreatorvalueoperation.cpp2
37 files changed, 45 insertions, 2625 deletions
diff --git a/src/libs/installer/addqtcreatorarrayvalueoperation.cpp b/src/libs/installer/addqtcreatorarrayvalueoperation.cpp
index 7da24febe..23d160a9a 100644
--- a/src/libs/installer/addqtcreatorarrayvalueoperation.cpp
+++ b/src/libs/installer/addqtcreatorarrayvalueoperation.cpp
@@ -103,7 +103,7 @@ bool AddQtCreatorArrayValueOperation::performOperation()
int arraySize = settings.beginReadArray(arrayName);
for (int i = 0; i < arraySize; ++i) {
settings.setArrayIndex(i);
- //if it is already there we have nothing todo
+ //if it is already there we have nothing to do
if (settings.value(key).toString() == value)
return true;
oldArrayValues.append(settings.value(key).toString());
@@ -121,7 +121,7 @@ bool AddQtCreatorArrayValueOperation::performOperation()
settings.setValue(key, value);
settings.endArray();
- settings.sync(); //be save ;)
+ settings.sync(); //be safe ;)
setValue(QLatin1String("ArrayValueSet"), true);
return true;
}
@@ -178,7 +178,7 @@ bool AddQtCreatorArrayValueOperation::undoOperation()
}
settings.endArray();
- settings.sync(); //be save ;)
+ settings.sync(); //be safe ;)
return true;
}
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index 472f269fc..1dd70294b 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -938,8 +938,9 @@ void Component::addOperation(Operation *operation)
void Component::addElevatedOperation(Operation *operation)
{
if (value(scRequiresAdminRights, scFalse) != scTrue) {
- qWarning() << QString::fromLatin1("component %1 uses addElevatedOperation in the script, but it doesn't"
- "have the needed RequiresAdminRights tag").arg(name());
+ qWarning() << QString::fromLatin1("Component %1 uses addElevatedOperation in the script, "
+ "but it does not have the needed RequiresAdminRights tag"
+ ).arg(name());
}
addOperation(operation);
operation->setValue(QLatin1String("admin"), true);
@@ -1204,7 +1205,7 @@ bool Component::isAutoDependOn(const QSet<QString> &componentsToInstall) const
QLatin1String("isAutoDependOn"));
} catch (const Error &error) {
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
- QLatin1String("isAutoDependOnError"), tr("Can't resolve isAutoDependOn in %1"
+ QLatin1String("isAutoDependOnError"), tr("Cannot resolve isAutoDependOn in %1"
).arg(name()), error.message());
return false;
}
@@ -1254,7 +1255,7 @@ bool Component::isDefault() const
QLatin1String("isDefault"));
} catch (const Error &error) {
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
- QLatin1String("isDefaultError"), tr("Can't resolve isDefault in %1").arg(name()),
+ QLatin1String("isDefaultError"), tr("Cannot resolve isDefault in %1").arg(name()),
error.message());
return false;
}
diff --git a/src/libs/installer/consumeoutputoperation.cpp b/src/libs/installer/consumeoutputoperation.cpp
index 2d3bc1ec0..04d7c9a8c 100644
--- a/src/libs/installer/consumeoutputoperation.cpp
+++ b/src/libs/installer/consumeoutputoperation.cpp
@@ -134,7 +134,7 @@ bool ConsumeOutputOperation::performOperation()
}
if (executableOutput.isEmpty()) {
- qWarning() << QString::fromLatin1("Can't get any query output from executable: '%1'").arg(
+ qWarning() << QString::fromLatin1("Cannot get any query output from executable: '%1'").arg(
executable.absoluteFilePath());
}
core->setValue(installerKeyName, QString::fromLatin1(executableOutput));
diff --git a/src/libs/installer/createshortcutoperation.cpp b/src/libs/installer/createshortcutoperation.cpp
index 9f9084e05..963f0aaf8 100644
--- a/src/libs/installer/createshortcutoperation.cpp
+++ b/src/libs/installer/createshortcutoperation.cpp
@@ -250,7 +250,7 @@ bool CreateShortcutOperation::undoOperation()
{
const QString &linkLocation = arguments().at(1);
if (!deleteFileNowOrLater(linkLocation) )
- qDebug() << "Can't delete:" << linkLocation;
+ qDebug() << "Cannot delete:" << linkLocation;
QDir dir; // remove all directories we created
const QStringList directoriesToDelete = value(QLatin1String("createddirs")).toStringList();
diff --git a/src/libs/installer/environmentvariablesoperation.cpp b/src/libs/installer/environmentvariablesoperation.cpp
index 192272a8d..e66c6fc0d 100644
--- a/src/libs/installer/environmentvariablesoperation.cpp
+++ b/src/libs/installer/environmentvariablesoperation.cpp
@@ -71,7 +71,7 @@ static bool broadcastChange() {
// Use SendMessageTimeout to Broadcast a message to the whole system to update settings of all
// running applications. This is needed to activate the changes done above without logout+login.
// Note that cmd.exe does not respond to any WM_SETTINGCHANGE messages...
- DWORD aResult = 0;
+ DWORD_PTR aResult = 0;
LRESULT sendresult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE,
0, (LPARAM) "Environment", SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, &aResult);
if (sendresult == 0 || aResult != 0) {
diff --git a/src/libs/installer/fileutils.cpp b/src/libs/installer/fileutils.cpp
index 6f8c44622..c7c7436bb 100644
--- a/src/libs/installer/fileutils.cpp
+++ b/src/libs/installer/fileutils.cpp
@@ -49,6 +49,7 @@
#include <QtCore/QTemporaryFile>
#include <QtCore/QThread>
#include <QtCore/QUrl>
+#include <QtCore/QCoreApplication>
#include <QImageReader>
#include <errno.h>
@@ -141,9 +142,15 @@ QString QInstaller::humanReadableSize(const qint64 &size, int precision)
double sizeAsDouble = size;
static QStringList measures;
if (measures.isEmpty())
- measures << QString::fromLatin1("bytes") << QString::fromLatin1("KiB") << QString::fromLatin1("MiB")
- << QString::fromLatin1("GiB") << QString::fromLatin1("TiB") << QString::fromLatin1("PiB")
- << QString::fromLatin1("EiB") << QString::fromLatin1("ZiB") << QString::fromLatin1("YiB");
+ measures << QCoreApplication::translate("QInstaller", "bytes")
+ << QCoreApplication::translate("QInstaller", "KiB")
+ << QCoreApplication::translate("QInstaller", "MiB")
+ << QCoreApplication::translate("QInstaller", "GiB")
+ << QCoreApplication::translate("QInstaller", "TiB")
+ << QCoreApplication::translate("QInstaller", "PiB")
+ << QCoreApplication::translate("QInstaller", "EiB")
+ << QCoreApplication::translate("QInstaller", "ZiB")
+ << QCoreApplication::translate("QInstaller", "YiB");
QStringListIterator it(measures);
QString measure(it.next());
diff --git a/src/libs/installer/fsengineclient.cpp b/src/libs/installer/fsengineclient.cpp
index abc686fd9..2a7a8a5bd 100644
--- a/src/libs/installer/fsengineclient.cpp
+++ b/src/libs/installer/fsengineclient.cpp
@@ -797,8 +797,8 @@ void FSEngineClientHandler::Private::maybeStartServer()
const QMessageBox::Button res =
QInstaller::MessageBoxHandler::critical(QInstaller::MessageBoxHandler::currentBestSuitParent(),
- QObject::tr("Authorization Error"), QObject::tr("Couldn't get authorization."),
- QObject::tr("Couldn't get authorization that is needed for continuing the installation.\n"
+ QObject::tr("Authorization Error"), QObject::tr("Could not get authorization."),
+ QObject::tr("Could not get authorization that is needed for continuing the installation.\n"
"Either abort the installation or use the fallback solution by running\n"
"%1\nas root and then clicking ok.").arg(fallback),
QMessageBox::Abort | QMessageBox::Ok, QMessageBox::Ok);
diff --git a/src/libs/installer/init.cpp b/src/libs/installer/init.cpp
index a8a7f54d8..9ef72b4dd 100644
--- a/src/libs/installer/init.cpp
+++ b/src/libs/installer/init.cpp
@@ -63,16 +63,8 @@
// QtSDK specific
#include "qtpatchoperation.h"
#include "consumeoutputoperation.h"
-#include "setdemospathonqtoperation.h"
-#include "setexamplespathonqtoperation.h"
-#include "setpluginpathonqtcoreoperation.h"
-#include "setimportspathonqtcoreoperation.h"
-#include "setpathonqtcoreoperation.h"
-#include "registerqtincreatorqnxoperation.h"
#include "setqtcreatorvalueoperation.h"
#include "addqtcreatorarrayvalueoperation.h"
-#include "registertoolchainoperation.h"
-#include "registerdefaultdebuggeroperation.h"
#ifdef Q_OS_MAC
# include "macreplaceinstallnamesoperation.h"
@@ -247,14 +239,6 @@ void QInstaller::init()
factory.registerUpdateOperation<ConsumeOutputOperation>(QLatin1String("ConsumeOutput"));
// QtSDK specific
- factory.registerUpdateOperation<RegisterQtInCreatorQNXOperation>(QLatin1String("RegisterQtInCreatorQNX"));
- factory.registerUpdateOperation<RegisterToolChainOperation>(QLatin1String("RegisterToolChain"));
- factory.registerUpdateOperation<RegisterDefaultDebuggerOperation>(QLatin1String("RegisterDefaultDebugger"));
- factory.registerUpdateOperation<SetDemosPathOnQtOperation>(QLatin1String("SetDemosPathOnQt"));
- factory.registerUpdateOperation<SetExamplesPathOnQtOperation>(QLatin1String("SetExamplesPathOnQt"));
- factory.registerUpdateOperation<SetPluginPathOnQtCoreOperation>(QLatin1String("SetPluginPathOnQtCore"));
- factory.registerUpdateOperation<SetImportsPathOnQtCoreOperation>(QLatin1String("SetImportsPathOnQtCore"));
- factory.registerUpdateOperation<SetPathOnQtCoreOperation>(QLatin1String("SetPathOnQtCore"));
factory.registerUpdateOperation<SetQtCreatorValueOperation>(QLatin1String("SetQtCreatorValue"));
factory.registerUpdateOperation<AddQtCreatorArrayValueOperation>(QLatin1String("AddQtCreatorArrayValue"));
factory.registerUpdateOperation<QtPatchOperation>(QLatin1String("QtPatch"));
diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro
index 653b65d6f..a1631c4a3 100644
--- a/src/libs/installer/installer.pro
+++ b/src/libs/installer/installer.pro
@@ -52,18 +52,10 @@ HEADERS += packagemanagercore.h \
componentmodel.h \
qinstallerglobal.h \
qtpatch.h \
- persistentsettings.h \
- projectexplorer_export.h \
qtpatchoperation.h \
consumeoutputoperation.h \
- setpathonqtcoreoperation.h \
- setdemospathonqtoperation.h \
- setexamplespathonqtoperation.h \
- setpluginpathonqtcoreoperation.h \
- setimportspathonqtcoreoperation.h \
replaceoperation.h \
linereplaceoperation.h \
- registertoolchainoperation.h \
setqtcreatorvalueoperation.h \
addqtcreatorarrayvalueoperation.h \
copydirectoryoperation.h \
@@ -98,8 +90,6 @@ HEADERS += packagemanagercore.h \
licenseoperation.h \
component_p.h \
qtcreator_constants.h \
- qtcreatorpersistentsettings.h \
- registerdefaultdebuggeroperation.h \
qprocesswrapper.h \
qsettingswrapper.h \
constants.h \
@@ -109,7 +99,6 @@ HEADERS += packagemanagercore.h \
link.h \
createlinkoperation.h \
packagemanagercoredata.h \
- registerqtincreatorqnxoperation.h \
applyproductkeyoperation.h \
globals.h \
graph.h
@@ -128,17 +117,10 @@ HEADERS += packagemanagercore.h \
scriptengine.cpp \
componentmodel.cpp \
qtpatch.cpp \
- persistentsettings.cpp \
qtpatchoperation.cpp \
consumeoutputoperation.cpp \
- setpathonqtcoreoperation.cpp \
- setdemospathonqtoperation.cpp \
- setexamplespathonqtoperation.cpp \
- setpluginpathonqtcoreoperation.cpp \
- setimportspathonqtcoreoperation.cpp \
replaceoperation.cpp \
linereplaceoperation.cpp \
- registertoolchainoperation.cpp \
setqtcreatorvalueoperation.cpp \
addqtcreatorarrayvalueoperation.cpp \
copydirectoryoperation.cpp \
@@ -170,8 +152,6 @@ HEADERS += packagemanagercore.h \
getrepositoriesmetainfojob.cpp \
licenseoperation.cpp \
component_p.cpp \
- qtcreatorpersistentsettings.cpp \
- registerdefaultdebuggeroperation.cpp \
qprocesswrapper.cpp \
templates.cpp \
qsettingswrapper.cpp \
@@ -182,7 +162,6 @@ HEADERS += packagemanagercore.h \
link.cpp \
createlinkoperation.cpp \
packagemanagercoredata.cpp \
- registerqtincreatorqnxoperation.cpp \
applyproductkeyoperation.cpp \
globals.cpp
diff --git a/src/libs/installer/macreplaceinstallnamesoperation.cpp b/src/libs/installer/macreplaceinstallnamesoperation.cpp
index fa5e6139a..9ec553358 100644
--- a/src/libs/installer/macreplaceinstallnamesoperation.cpp
+++ b/src/libs/installer/macreplaceinstallnamesoperation.cpp
@@ -148,7 +148,7 @@ int MacReplaceInstallNamesOperation::updateExecutableInfo(MacBinaryInfo *binaryI
QProcessWrapper otool;
otool.start(QLatin1String("otool"), QStringList() << QLatin1String("-l") << binaryInfo->fileName);
if (!otool.waitForStarted()) {
- setError(UserDefinedError, tr("Can't invoke otool. Is Xcode installed?"));
+ setError(UserDefinedError, tr("Cannot invoke otool. Is Xcode installed?"));
return -1;
}
otool.waitForFinished();
@@ -230,7 +230,7 @@ bool MacReplaceInstallNamesOperation::execCommand(const QString &cmd, const QStr
QProcessWrapper process;
process.start(cmd, args);
if (!process.waitForStarted()) {
- setError(UserDefinedError, tr("Can't start process %0.").arg(cmd));
+ setError(UserDefinedError, tr("Cannot start process %0.").arg(cmd));
return false;
}
process.waitForFinished();
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 5a4deec3d..5f33d941a 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -1663,15 +1663,23 @@ QString PackageManagerCore::findLibrary(const QString &name, const QStringList &
#if defined(Q_OS_WIN)
return findPath(QString::fromLatin1("%1.lib").arg(name), findPaths);
#else
+#if defined(Q_OS_MAC)
if (findPaths.isEmpty()) {
findPaths.push_back(QLatin1String("/lib"));
findPaths.push_back(QLatin1String("/usr/lib"));
findPaths.push_back(QLatin1String("/usr/local/lib"));
findPaths.push_back(QLatin1String("/opt/local/lib"));
}
-#if defined(Q_OS_MAC)
const QString dynamic = findPath(QString::fromLatin1("lib%1.dylib").arg(name), findPaths);
#else
+ if (findPaths.isEmpty()) {
+ findPaths.push_back(QLatin1String("/lib"));
+ findPaths.push_back(QLatin1String("/usr/lib"));
+ findPaths.push_back(QLatin1String("/usr/local/lib"));
+ findPaths.push_back(QLatin1String("/lib64"));
+ findPaths.push_back(QLatin1String("/usr/lib64"));
+ findPaths.push_back(QLatin1String("/usr/local/lib64"));
+ }
const QString dynamic = findPath(QString::fromLatin1("lib%1.so*").arg(name), findPaths);
#endif
if (!dynamic.isEmpty())
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp
index daa0158e8..aac392d47 100644
--- a/src/libs/installer/packagemanagercore_p.cpp
+++ b/src/libs/installer/packagemanagercore_p.cpp
@@ -525,7 +525,7 @@ bool PackageManagerCorePrivate::appendComponentToInstall(Component *component)
if (dependencyComponent == 0) {
QString errorMessage;
if (!dependencyComponent)
- errorMessage = QString::fromLatin1("Can't find missing dependency (%1) for %2.");
+ errorMessage = QString::fromLatin1("Cannot find missing dependency (%1) for %2.");
errorMessage = errorMessage.arg(dependencyComponentName, component->name());
qDebug() << qPrintable(errorMessage);
m_componentsToInstallError.append(errorMessage);
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index fc81ad9ff..a514b3e82 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -55,10 +55,8 @@
#include "kdsysinfo.h"
#include <QtCore/QDir>
-#include <QtCore/QDynamicPropertyChangeEvent>
#include <QtCore/QPair>
#include <QtCore/QProcess>
-#include <QtCore/QRegExp>
#include <QtCore/QSettings>
#include <QtCore/QTimer>
@@ -66,7 +64,6 @@
#include <QDesktopServices>
#include <QFileDialog>
#include <QGridLayout>
-#include <QFormLayout>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QLabel>
@@ -74,14 +71,11 @@
#include <QListWidget>
#include <QListWidgetItem>
#include <QMessageBox>
-#include <QProgressBar>
#include <QPushButton>
#include <QRadioButton>
#include <QTextBrowser>
-#include <QTreeWidget>
#include <QTreeView>
#include <QVBoxLayout>
-#include <QScrollBar>
#include <QShowEvent>
using namespace KDUpdater;
@@ -531,7 +525,6 @@ void PackageManagerGui::cancelButtonClicked()
void PackageManagerGui::rejectWithoutPrompt()
{
- m_core->setCanceled();
QDialog::reject();
}
@@ -1725,7 +1718,7 @@ void PerformInstallationPage::entering()
setCommitPage(true);
if (packageManagerCore()->isUninstaller()) {
- setButtonText(QWizard::CommitButton, tr("&Uninstall"));
+ setButtonText(QWizard::CommitButton, tr("U&ninstall"));
setTitle(tr("Uninstalling %1").arg(productName()));
QTimer::singleShot(30, packageManagerCore(), SLOT(runUninstaller()));
diff --git a/src/libs/installer/persistentsettings.cpp b/src/libs/installer/persistentsettings.cpp
deleted file mode 100644
index ecafe7682..000000000
--- a/src/libs/installer/persistentsettings.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "persistentsettings.h"
-
-#include <QtCore/QDebug>
-#include <QtCore/QFile>
-#include <QtCore/QVariant>
-#include <QtXml/QDomDocument>
-#include <QtXml/QDomCDATASection>
-#include <QtXml/QDomElement>
-
-
-using namespace ProjectExplorer;
-
-PersistentSettingsReader::PersistentSettingsReader()
-{
-}
-
-QVariant PersistentSettingsReader::restoreValue(const QString &variable) const
-{
- if (m_valueMap.contains(variable))
- return m_valueMap.value(variable);
- return QVariant();
-}
-
-QVariantMap PersistentSettingsReader::restoreValues() const
-{
- return m_valueMap;
-}
-
-bool PersistentSettingsReader::load(const QString &fileName)
-{
- m_valueMap.clear();
-
- QFile file(fileName);
- if (!file.open(QIODevice::ReadOnly))
- return false;
-
- QDomDocument doc;
- if (!doc.setContent(&file))
- return false;
-
- QDomElement root = doc.documentElement();
- if (root.nodeName() != QLatin1String("qtcreator"))
- return false;
-
- QDomElement child = root.firstChildElement();
- for (; !child.isNull(); child = child.nextSiblingElement()) {
- if (child.nodeName() == QLatin1String("data"))
- readValues(child);
- }
-
- file.close();
- return true;
-}
-
-QVariant PersistentSettingsReader::readValue(const QDomElement &valElement) const
-{
- QString name = valElement.nodeName();
- QString type = valElement.attribute(QLatin1String("type"));
- QVariant v;
-
- if (name == QLatin1String("value")) {
- if(type == QLatin1String("QChar")) {
- //Workaround: QTBUG-12345
- v.setValue(QChar(valElement.text().at(0)));
- } else {
- v.setValue(valElement.text());
- v.convert(QVariant::nameToType(type.toLatin1().data()));
- }
- } else if (name == QLatin1String("valuelist")) {
- QDomElement child = valElement.firstChildElement();
- QList<QVariant> valList;
- for (; !child.isNull(); child = child.nextSiblingElement()) {
- valList << readValue(child);
- }
- v.setValue(valList);
- } else if (name == QLatin1String("valuemap")) {
- QDomElement child = valElement.firstChildElement();
- QMap<QString, QVariant> valMap;
- for (; !child.isNull(); child = child.nextSiblingElement()) {
- QString key = child.attribute(QLatin1String("key"));
- valMap.insert(key, readValue(child));
- }
- v.setValue(valMap);
- }
-
- return v;
-}
-
-void PersistentSettingsReader::readValues(const QDomElement &data)
-{
- QString variable;
- QVariant v;
-
- QDomElement child = data.firstChildElement();
- for (; !child.isNull(); child = child.nextSiblingElement()) {
- if (child.nodeName() == QLatin1String("variable"))
- variable = child.text();
- else
- v = readValue(child);
- }
-
- m_valueMap.insert(variable, v);
-}
-
-///
-/// PersistentSettingsWriter
-///
-
-PersistentSettingsWriter::PersistentSettingsWriter()
-{
-}
-
-void PersistentSettingsWriter::writeValue(QDomElement &ps, const QVariant &variant)
-{
- if (variant.type() == QVariant::StringList || variant.type() == QVariant::List) {
- QDomElement values = ps.ownerDocument().createElement(QLatin1String("valuelist"));
- values.setAttribute(QLatin1String("type"), QLatin1String(QVariant::typeToName(QVariant::List)));
- QList<QVariant> varList = variant.toList();
- foreach (const QVariant &var, varList) {
- writeValue(values, var);
- }
- ps.appendChild(values);
- } else if (variant.type() == QVariant::Map) {
- QDomElement values = ps.ownerDocument().createElement(QLatin1String("valuemap"));
- values.setAttribute(QLatin1String("type"), QLatin1String(QVariant::typeToName(QVariant::Map)));
-
- QMap<QString, QVariant> varMap = variant.toMap();
- QMap<QString, QVariant>::const_iterator i = varMap.constBegin();
- while (i != varMap.constEnd()) {
- writeValue(values, i.value());
- values.lastChild().toElement().
- setAttribute(QLatin1String("key"), i.key());
- ++i;
- }
-
- ps.appendChild(values);
- } else {
- QDomElement value = ps.ownerDocument().createElement(QLatin1String("value"));
- ps.appendChild(value);
- QDomText valueText = ps.ownerDocument().createTextNode(variant.toString());
- value.appendChild(valueText);
- value.setAttribute(QLatin1String("type"), QLatin1String(variant.typeName()));
- ps.appendChild(value);
- }
-}
-
-void PersistentSettingsWriter::saveValue(const QString &variable, const QVariant &value)
-{
- m_valueMap[variable] = value;
-}
-
-bool PersistentSettingsWriter::save(const QString &fileName, const QString &docType)
-{
- QFile file(fileName);
- if (!file.open(QIODevice::WriteOnly))
- return false;
-
- QDomDocument doc(docType);
-
- QDomElement root = doc.createElement(QLatin1String("qtcreator"));
- doc.appendChild(root);
-
- QMap<QString, QVariant>::const_iterator i = m_valueMap.constBegin();
- while (i != m_valueMap.constEnd()) {
- QDomElement ps = doc.createElement(QLatin1String("data"));
- root.appendChild(ps);
-
- QDomElement variable = doc.createElement(QLatin1String("variable"));
- ps.appendChild(variable);
- QDomText variableText = doc.createTextNode(i.key());
- variable.appendChild(variableText);
-
- writeValue(ps, i.value());
- ++i;
- }
-
- file.write(doc.toByteArray());
- file.close();
- return true;
-}
diff --git a/src/libs/installer/persistentsettings.h b/src/libs/installer/persistentsettings.h
deleted file mode 100644
index 71249cd70..000000000
--- a/src/libs/installer/persistentsettings.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef PERSISTENTSETTINGS_H
-#define PERSISTENTSETTINGS_H
-
-#include "projectexplorer_export.h"
-
-#include <QtCore/QMap>
-#include <QtCore/QVariant>
-
-QT_BEGIN_NAMESPACE
-class QDomElement;
-QT_END_NAMESPACE
-
-namespace ProjectExplorer {
-
-class PROJECTEXPLORER_EXPORT PersistentSettingsReader
-{
-public:
- PersistentSettingsReader();
- QVariant restoreValue(const QString &variable) const;
- QVariantMap restoreValues() const;
- bool load(const QString & fileName);
-
-private:
- QVariant readValue(const QDomElement &valElement) const;
- void readValues(const QDomElement &data);
- QMap<QString, QVariant> m_valueMap;
-};
-
-class PROJECTEXPLORER_EXPORT PersistentSettingsWriter
-{
-public:
- PersistentSettingsWriter();
- void saveValue(const QString &variable, const QVariant &value);
- bool save(const QString &fileName, const QString &docType);
-
-private:
- void writeValue(QDomElement &ps, const QVariant &value);
- QMap<QString, QVariant> m_valueMap;
-};
-
-} // namespace ProjectExplorer
-
-#endif // PERSISTENTSETTINGS_H
diff --git a/src/libs/installer/projectexplorer_export.h b/src/libs/installer/projectexplorer_export.h
deleted file mode 100644
index 0e8cb470b..000000000
--- a/src/libs/installer/projectexplorer_export.h
+++ /dev/null
@@ -1 +0,0 @@
-#define PROJECTEXPLORER_EXPORT
diff --git a/src/libs/installer/qtcreatorpersistentsettings.cpp b/src/libs/installer/qtcreatorpersistentsettings.cpp
deleted file mode 100644
index bc035b422..000000000
--- a/src/libs/installer/qtcreatorpersistentsettings.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "qtcreatorpersistentsettings.h"
-#include "qtcreator_constants.h"
-
-#include <QDebug>
-#include <QStringList>
-#include <QFile>
-#include <QDir>
-
-QtCreatorPersistentSettings::QtCreatorPersistentSettings()
-{
-}
-
-bool QtCreatorPersistentSettings::init(const QString &fileName)
-{
- Q_ASSERT(!fileName.isEmpty());
- if (fileName.isEmpty())
- return false;
- m_fileName = fileName;
- if (m_reader.load(m_fileName) && !versionCheck())
- return false;
-
- m_toolChains = readValidToolChains();
- m_abiToDebuggerHash = readAbiToDebuggerHash();
-
- return true;
-}
-
-bool QtCreatorPersistentSettings::versionCheck()
-{
- QVariantMap data = m_reader.restoreValues();
-
- // Check version:
- int version = data.value(QLatin1String(TOOLCHAIN_FILE_VERSION_KEY), 0).toInt();
- if (version < 1)
- return false;
- return true;
-}
-
-
-QHash<QString, QVariantMap> QtCreatorPersistentSettings::readValidToolChains()
-{
- if (m_fileName.isEmpty())
- return QHash<QString, QVariantMap>();
-
- QHash<QString, QVariantMap> toolChainHash;
-
- QVariantMap data = m_reader.restoreValues();
-
- int count = data.value(QLatin1String(TOOLCHAIN_COUNT_KEY), 0).toInt();
- for (int i = 0; i < count; ++i) {
- const QString key = QLatin1String(TOOLCHAIN_DATA_KEY) + QString::number(i);
-
- const QVariantMap toolChainMap = data.value(key).toMap();
-
- //gets the path variable, hope ".Path" will stay in QtCreator
- QStringList pathContainingKeyList = QStringList(toolChainMap.keys()).filter(QLatin1String(
- ".Path"));
- foreach (const QString& pathKey, pathContainingKeyList) {
- QString path = toolChainMap.value(pathKey).toString();
- if (!path.isEmpty() && QFile::exists(path)) {
- toolChainHash.insert(path, toolChainMap);
- }
- }
- }
- return toolChainHash;
-}
-
-QHash<QString, QString> QtCreatorPersistentSettings::abiToDebuggerHash()
-{
- return m_abiToDebuggerHash;
-}
-
-QHash<QString, QString> QtCreatorPersistentSettings::readAbiToDebuggerHash()
-{
- if (m_fileName.isEmpty())
- return QHash<QString, QString>();
-
- QHash<QString, QString> abiToDebuggerHash;
-
- QVariantMap data = m_reader.restoreValues();
-
- // Read default debugger settings (if any)
- int count = data.value(QLatin1String(DEFAULT_DEBUGGER_COUNT_KEY)).toInt();
- for (int i = 0; i < count; ++i) {
- const QString abiKey = QString::fromLatin1(DEFAULT_DEBUGGER_ABI_KEY) + QString::number(i);
- if (!data.contains(abiKey))
- continue;
- const QString pathKey = QString::fromLatin1(DEFAULT_DEBUGGER_PATH_KEY) + QString::number(i);
- if (!data.contains(pathKey))
- continue;
- abiToDebuggerHash.insert(data.value(abiKey).toString(), data.value(pathKey).toString());
- }
- return abiToDebuggerHash;
-}
-
-bool QtCreatorPersistentSettings::addToolChain(const QtCreatorToolChain &toolChain)
-{
- if (toolChain.key.isEmpty())
- return false;
- if (toolChain.type.isEmpty())
- return false;
- if (toolChain.displayName.isEmpty())
- return false;
- if (toolChain.abiString.isEmpty())
- return false;
- if (toolChain.compilerPath.isEmpty())
- return false;
-
- QVariantMap newToolChainVariantMap;
-
- newToolChainVariantMap.insert(QLatin1String(ID_KEY),
- QString::fromLatin1("%1:%2.%3").arg(toolChain.type, QFileInfo(toolChain.compilerPath
- ).absoluteFilePath(), toolChain.abiString));
- newToolChainVariantMap.insert(QLatin1String(DISPLAY_NAME_KEY), toolChain.displayName);
- newToolChainVariantMap.insert(QString::fromLatin1("ProjectExplorer.%1.Path").arg(toolChain.key),
- QFileInfo(toolChain.compilerPath).absoluteFilePath());
- newToolChainVariantMap.insert(QString::fromLatin1("ProjectExplorer.%1.TargetAbi").arg(toolChain.key),
- toolChain.abiString);
- newToolChainVariantMap.insert(QString::fromLatin1("ProjectExplorer.%1.Debugger").arg(toolChain.key),
- QFileInfo(toolChain.debuggerPath).absoluteFilePath());
-
- m_toolChains.insert(QFileInfo(toolChain.compilerPath).absoluteFilePath(), newToolChainVariantMap);
- return true;
-}
-
-bool QtCreatorPersistentSettings::removeToolChain(const QtCreatorToolChain &toolChain)
-{
- m_toolChains.remove(QFileInfo(toolChain.compilerPath).absoluteFilePath());
- return true;
-}
-
-void QtCreatorPersistentSettings::addDefaultDebugger(const QString &abiString, const QString &debuggerPath)
-{
- m_abiToDebuggerHash.insert(abiString, debuggerPath);
-}
-
-void QtCreatorPersistentSettings::removeDefaultDebugger(const QString &abiString)
-{
- m_abiToDebuggerHash.remove(abiString);
-}
-
-bool QtCreatorPersistentSettings::save()
-{
- if (m_fileName.isEmpty())
- return false;
-
- m_writer.saveValue(QLatin1String(DEFAULT_DEBUGGER_COUNT_KEY), m_abiToDebuggerHash.count());
-
- QHashIterator<QString, QString> it(m_abiToDebuggerHash);
- int debuggerCounter = 0;
- while (it.hasNext()) {
- it.next();
- const QString abiKey = QString::fromLatin1(DEFAULT_DEBUGGER_ABI_KEY) + QString::number(
- debuggerCounter);
- const QString pathKey = QString::fromLatin1(DEFAULT_DEBUGGER_PATH_KEY) + QString::number(
- debuggerCounter);
- m_writer.saveValue(abiKey, it.key());
- m_writer.saveValue(pathKey, it.value());
- debuggerCounter++;
- }
-
- m_writer.saveValue(QLatin1String(TOOLCHAIN_COUNT_KEY), m_toolChains.count());
-
- int toolChainCounter = 0;
-
- foreach (QVariantMap toolChainMap, m_toolChains.values()) {
- if (toolChainMap.isEmpty())
- continue;
-
- //if we added a new debugger we need to adjust the tool chains
- QString abiString;
- //find the abiString
- foreach (const QString &key, toolChainMap.keys()) {
- if (key.contains(QLatin1String(".TargetAbi"))) {
- abiString = toolChainMap.value(key).toString();
- break;
- }
- }
- //adjust debugger path
- foreach (const QString &key, toolChainMap.keys()) {
- if (key.contains(QLatin1String(".Debugger"))) {
- toolChainMap.insert(key, m_abiToDebuggerHash.value(abiString));
- break;
- }
- }
-
- m_writer.saveValue(QLatin1String(TOOLCHAIN_DATA_KEY) + QString::number(toolChainCounter++),
- toolChainMap);
- }
-
- m_writer.saveValue(QLatin1String(TOOLCHAIN_FILE_VERSION_KEY), 1);
-
- QDir().mkpath(QFileInfo(m_fileName).absolutePath());
- return m_writer.save(m_fileName, QLatin1String("QtCreatorToolChains"));
-}
diff --git a/src/libs/installer/qtcreatorpersistentsettings.h b/src/libs/installer/qtcreatorpersistentsettings.h
deleted file mode 100644
index 4e299475a..000000000
--- a/src/libs/installer/qtcreatorpersistentsettings.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef QTCREATORPERSISTENTSETTINGS_H
-#define QTCREATORPERSISTENTSETTINGS_H
-
-#include "persistentsettings.h"
-
-#include <QHash>
-#include <QString>
-#include <QVariantMap>
-
-struct QtCreatorToolChain
-{
- QString key;
- QString type;
- QString displayName;
- QString abiString;
- QString compilerPath;
- QString debuggerPath;
- QString armVersion;
- QString force32Bit;
-};
-
-class QtCreatorPersistentSettings
-{
-public:
- QtCreatorPersistentSettings();
- bool init(const QString &fileName);
- bool addToolChain(const QtCreatorToolChain &toolChain);
- bool removeToolChain(const QtCreatorToolChain &toolChain);
- void addDefaultDebugger(const QString &abiString, const QString &debuggerPath);
- void removeDefaultDebugger(const QString &abiString);
- bool save();
- QHash<QString, QString> abiToDebuggerHash();
-
-private:
- QHash<QString, QVariantMap> readValidToolChains();
- QHash<QString, QString> readAbiToDebuggerHash();
- bool versionCheck();
-
- QString m_fileName;
- QHash<QString, QVariantMap> m_toolChains;
- QHash<QString, QString> m_abiToDebuggerHash;
- ProjectExplorer::PersistentSettingsReader m_reader;
- ProjectExplorer::PersistentSettingsWriter m_writer;
-
-};
-
-#endif // QTCREATORPERSISTENTSETTINGS_H
diff --git a/src/libs/installer/qtpatch.cpp b/src/libs/installer/qtpatch.cpp
index 6581815c2..7a1e18df3 100644
--- a/src/libs/installer/qtpatch.cpp
+++ b/src/libs/installer/qtpatch.cpp
@@ -113,7 +113,7 @@ QHash<QString, QByteArray> QtPatch::qmakeValues(const QString &qmakePath, QByteA
}
if (qmakeValueHash.isEmpty())
- qDebug() << "Can't get any query output from qmake.";
+ qDebug() << "Cannot get any query output from qmake.";
return qmakeValueHash;
}
diff --git a/src/libs/installer/registerdefaultdebuggeroperation.cpp b/src/libs/installer/registerdefaultdebuggeroperation.cpp
deleted file mode 100644
index d6cdac851..000000000
--- a/src/libs/installer/registerdefaultdebuggeroperation.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "registerdefaultdebuggeroperation.h"
-
-#include "persistentsettings.h"
-#include "packagemanagercore.h"
-#include "qtcreator_constants.h"
-#include "qtcreatorpersistentsettings.h"
-
-#include <QString>
-#include <QFileInfo>
-#include <QDir>
-#include <QSettings>
-#include <QDebug>
-
-using namespace QInstaller;
-
-using namespace ProjectExplorer;
-
-//TODO move this to a general location it is used on some classes
-static QString fromNativeSeparatorsAllOS(const QString &pathName)
-{
- QString n = pathName;
- for (int i = 0; i < n.size(); ++i) {
- if (n.at(i) == QLatin1Char('\\'))
- n[i] = QLatin1Char('/');
- }
- return n;
-}
-
-RegisterDefaultDebuggerOperation::RegisterDefaultDebuggerOperation()
-{
- setName(QLatin1String("RegisterDefaultDebugger"));
-}
-
-void RegisterDefaultDebuggerOperation::backup()
-{
-}
-
-/** application binary interface - this is an internal creator typ as a String CPU-OS-OS_FLAVOR-BINARY_FORMAT-WORD_WIDTH
- * CPU: arm x86 mips ppc itanium
- * OS: linux macos symbian unix windows
- * OS_FLAVOR: generic maemo meego generic device emulator generic msvc2005 msvc2008 msvc2010 msys ce
- * BINARY_FORMAT: elf pe mach_o qml_rt
- * WORD_WIDTH: 8 16 32 64
- */
-
-bool RegisterDefaultDebuggerOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() != 2) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String("")));
- return false;
- }
-
- QString toolChainsXmlFilePath;
-
- PackageManagerCore *const core = value(QLatin1String("installer")).value<PackageManagerCore*>();
- if (!core) {
- setError(UserDefinedError);
- setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name()));
- return false;
- }
- if (core->value(scQtCreatorInstallerToolchainsFile).isEmpty()) {
- setError(UserDefinedError);
- setErrorString(tr("There is no value set for %1 on the installer object.").arg(
- scQtCreatorInstallerToolchainsFile));
- return false;
- }
- toolChainsXmlFilePath = core->value(scQtCreatorInstallerToolchainsFile);
-
- int argCounter = 0;
- const QString &abiString = args.at(argCounter++); //for example x86-windows-msys-pe-32bit
- const QString &debuggerPath = fromNativeSeparatorsAllOS(args.at(argCounter++));
-
- QtCreatorPersistentSettings creatorToolChainSettings;
-
- if (!creatorToolChainSettings.init(toolChainsXmlFilePath)) {
- setError(UserDefinedError);
- setErrorString(tr("Can't read from tool chains xml file(%1) correctly.")
- .arg(toolChainsXmlFilePath));
- return false;
- }
-
- creatorToolChainSettings.addDefaultDebugger(abiString, debuggerPath);
- return creatorToolChainSettings.save();
-}
-
-bool RegisterDefaultDebuggerOperation::undoOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() != 2) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, 2 expected.")
- .arg(name()).arg(args.count()));
- return false;
- }
-
- PackageManagerCore *const core = value(QLatin1String("installer")).value<PackageManagerCore*>();
- if (!core) {
- setError(UserDefinedError);
- setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name()));
- return false;
- }
-
- // default value is the old value to keep the possibility that old saved operations can run undo
-#ifdef Q_OS_MAC
- QString toolChainsXmlFilePath = core->value(scQtCreatorInstallerToolchainsFile,
- QString::fromLatin1("%1/Qt Creator.app/Contents/Resources/QtProject/toolChains.xml").arg(
- core->value(QLatin1String("TargetDir"))));
-#else
- QString toolChainsXmlFilePath = core->value(scQtCreatorInstallerToolchainsFile,
- QString::fromLatin1("%1/QtCreator/share/qtcreator/QtProject/toolChains.xml").arg(core->value(
- QLatin1String("TargetDir"))));
-#endif
-
- int argCounter = 0;
- const QString &abiString = args.at(argCounter++); //for example x86-windows-msys-pe-32bit
- const QString &debuggerPath = fromNativeSeparatorsAllOS(args.at(argCounter++));
- Q_UNUSED(debuggerPath)
-
- QtCreatorPersistentSettings creatorToolChainSettings;
-
- creatorToolChainSettings.init(toolChainsXmlFilePath);
- creatorToolChainSettings.removeDefaultDebugger(abiString);
- return creatorToolChainSettings.save();
-}
-
-bool RegisterDefaultDebuggerOperation::testOperation()
-{
- return true;
-}
-
-Operation *RegisterDefaultDebuggerOperation::clone() const
-{
- return new RegisterDefaultDebuggerOperation();
-}
diff --git a/src/libs/installer/registerdefaultdebuggeroperation.h b/src/libs/installer/registerdefaultdebuggeroperation.h
deleted file mode 100644
index 87712e5d8..000000000
--- a/src/libs/installer/registerdefaultdebuggeroperation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef REGISTERDEFAULTDEBUGGEROPERATION_H
-#define REGISTERDEFAULTDEBUGGEROPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-class RegisterDefaultDebuggerOperation : public Operation
-{
-public:
- RegisterDefaultDebuggerOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace QInstaller
-
-#endif // REGISTERDEFAULTDEBUGGEROPERATION_H
diff --git a/src/libs/installer/registerqtincreatorqnxoperation.cpp b/src/libs/installer/registerqtincreatorqnxoperation.cpp
deleted file mode 100644
index be99de4c7..000000000
--- a/src/libs/installer/registerqtincreatorqnxoperation.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "registerqtincreatorqnxoperation.h"
-
-#include "packagemanagercore.h"
-#include "qtcreator_constants.h"
-#include "persistentsettings.h"
-
-#include <QString>
-#include <QFileInfo>
-#include <QDir>
-#include <QSettings>
-#include <QDebug>
-
-
-using namespace QInstaller;
-
-// TODO: move this to a general location it is used on some classes
-static QString fromNativeSeparatorsAllOS(const QString &pathName)
-{
- QString n = pathName;
- for (int i = 0; i < n.size(); ++i) {
- if (n.at(i) == QLatin1Char('\\'))
- n[i] = QLatin1Char('/');
- }
- return n;
-}
-
-static QString absoluteQmakePath(const QString &path)
-{
- QString versionQmakePath = QDir(path).absolutePath();
- if (!versionQmakePath.endsWith(QLatin1String("qmake"))
- && !versionQmakePath.endsWith(QLatin1String("qmake.exe"))) {
-#if defined (Q_OS_WIN)
- versionQmakePath.append(QLatin1String("/bin/qmake.exe"));
-#elif defined(Q_OS_UNIX)
- versionQmakePath.append(QLatin1String("/bin/qmake"));
-#endif
- }
- return fromNativeSeparatorsAllOS(versionQmakePath);
-}
-
-RegisterQtInCreatorQNXOperation::RegisterQtInCreatorQNXOperation()
-{
- setName(QLatin1String("RegisterQtInCreatorQNX"));
-}
-
-void RegisterQtInCreatorQNXOperation::backup()
-{
-}
-
-// Parameter List:
-// Name - String displayed as name in Qt Creator
-// qmake path - location of the qmake binary
-// Type identifier - Desktop, Simulator, Symbian, ...
-// SDK identifier - unique string to identify Qt version inside of the SDK (eg. desk473, simu11, ...)
-// System Root Path
-// sbs path
-bool RegisterQtInCreatorQNXOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() < 5) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("at least 5"), QLatin1String("")));
- return false;
- }
-
- PackageManagerCore *const core = value(QLatin1String("installer")).value<PackageManagerCore*>();
- if (!core) {
- setError(UserDefinedError);
- setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name()));
- return false;
- }
-
- if (core->value(scQtCreatorInstallerQtVersionFile).isEmpty()) {
- setError(UserDefinedError);
- setErrorString(tr("There is no value set for %1 on the installer object.").arg(
- scQtCreatorInstallerQtVersionFile));
- return false;
- }
- const QString qtVersionsFileName = core->value(scQtCreatorInstallerQtVersionFile);
- int argCounter = 0;
- const QString &versionName = args.at(argCounter++);
- const QString &path = QDir::toNativeSeparators(args.value(argCounter++));
- const QString versionQmakePath = absoluteQmakePath(path);
-
- const QString &sdkPath = args.at(argCounter++);
- const QString &versionTypeIdentifier = args.at(argCounter++);
- const QString &versionSDKIdentifier = args.at(argCounter++);
- const QString &versionSystemRoot = fromNativeSeparatorsAllOS(args.value(argCounter++));
- const QString &versionSbsPath = fromNativeSeparatorsAllOS(args.value(argCounter++));
-
- ProjectExplorer::PersistentSettingsReader reader;
- int qtVersionCount = 0;
- QVariantMap map;
- if (reader.load(qtVersionsFileName)) {
- map = reader.restoreValues();
- qtVersionCount = map.value(QLatin1String("QtVersion.Count")).toInt();
- map.remove(QLatin1String("QtVersion.Count"));
- map.remove(QLatin1String("Version"));
- }
-
- ProjectExplorer::PersistentSettingsWriter writer;
- // Store old qt versions
- if (!map.isEmpty()) {
- for (int i = 0; i < qtVersionCount; ++i) {
- writer.saveValue(QString::fromLatin1("QtVersion.%1").arg(i)
- , map[QLatin1String("QtVersion.") + QString::number(i)].toMap());
- }
- map.clear();
- }
- // Enter new version
- map.insert(QLatin1String("Id"), -1);
- map.insert(QLatin1String("Arch"), 1);
- map.insert(QLatin1String("Name"), versionName);
- map.insert(QLatin1String("QMakePath"), versionQmakePath);
- map.insert(QLatin1String("SDKPath"), sdkPath);
- map.insert(QLatin1String("QtVersion.Type"),
- QLatin1String("Qt4ProjectManager.QtVersion.") + versionTypeIdentifier);
- map.insert(QLatin1String("isAutodetected"), true);
- map.insert(QLatin1String("autodetectionSource"),
- QLatin1String("SDK.") + versionSDKIdentifier);
- if (!versionSystemRoot.isEmpty())
- map.insert(QLatin1String("SystemRoot"), versionSystemRoot);
- if (!versionSbsPath.isEmpty())
- map.insert(QLatin1String("SBSv2Directory"), versionSbsPath);
-
- writer.saveValue(QLatin1String("QtVersion.") + QString::number(qtVersionCount), map);
-
- writer.saveValue(QLatin1String("Version"), 1);
- writer.saveValue(QLatin1String("QtVersion.Count"), qtVersionCount + 1);
- QDir().mkpath(QFileInfo(qtVersionsFileName).absolutePath());
- writer.save(qtVersionsFileName, QLatin1String("QtCreatorQtVersions"));
-
- return true;
-}
-
-bool RegisterQtInCreatorQNXOperation::undoOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() < 4) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, minimum 4 expected.")
- .arg(name()).arg(args.count()));
- return false;
- }
-
- PackageManagerCore *const core = value(QLatin1String("installer")).value<PackageManagerCore*>();
- if (!core) {
- setError(UserDefinedError);
- setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name()));
- return false;
- }
-
- // default value is the old value to keep the possibility that old saved operations can run undo
-#ifdef Q_OS_MAC
- QString qtVersionsFileName = core->value(scQtCreatorInstallerQtVersionFile,
- QString::fromLatin1("%1/Qt Creator.app/Contents/Resources/QtProject/qtversion.xml").arg(
- core->value(QLatin1String("TargetDir"))));
-#else
- QString qtVersionsFileName = core->value(scQtCreatorInstallerQtVersionFile,
- QString::fromLatin1("%1/QtCreator/share/qtcreator/QtProject/qtversion.xml").arg(core->value(
- QLatin1String("TargetDir"))));
-#endif
-
- ProjectExplorer::PersistentSettingsReader reader;
- // If no file, then it has been removed already
- if (!reader.load(qtVersionsFileName))
- return true;
-
- const QVariantMap map = reader.restoreValues();
-
- ProjectExplorer::PersistentSettingsWriter writer;
- const int qtVersionCount = map.value(QLatin1String("QtVersion.Count")).toInt();
-
- int currentVersionIndex = 0;
- for (int i = 0; i < qtVersionCount; ++i) {
- QVariantMap versionMap = map[QLatin1String("QtVersion.") + QString::number(i)].toMap();
-
- const QString path = QDir::toNativeSeparators(args.value(1));
- const QString versionQmakePath = absoluteQmakePath(path);
-
- //use absoluteQmakePath function to normalize the path string, for example //
- const QString existingQtQMakePath = absoluteQmakePath(
- versionMap[QLatin1String("QMakePath")].toString());
- if (existingQtQMakePath == versionQmakePath)
- continue;
- writer.saveValue(QString::fromLatin1("QtVersion.%1").arg(currentVersionIndex++), versionMap);
- }
-
- writer.saveValue(QLatin1String("QtVersion.Count"), currentVersionIndex);
- writer.saveValue(QLatin1String("Version"), map[QLatin1String("Version")].toInt());
-
- writer.save(qtVersionsFileName, QLatin1String("QtCreatorQtVersions"));
- return true;
-}
-
-bool RegisterQtInCreatorQNXOperation::testOperation()
-{
- return true;
-}
-
-Operation *RegisterQtInCreatorQNXOperation::clone() const
-{
- return new RegisterQtInCreatorQNXOperation();
-}
diff --git a/src/libs/installer/registerqtincreatorqnxoperation.h b/src/libs/installer/registerqtincreatorqnxoperation.h
deleted file mode 100644
index 5b6a3c9b1..000000000
--- a/src/libs/installer/registerqtincreatorqnxoperation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef REGISTERQTINCREATORQNXOPERATION_H
-#define REGISTERQTINCREATORQNXOPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-class RegisterQtInCreatorQNXOperation : public Operation
-{
-public:
- RegisterQtInCreatorQNXOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace QInstaller
-
-#endif // REGISTERQTINCREATORQNXOPERATION_H
diff --git a/src/libs/installer/registertoolchainoperation.cpp b/src/libs/installer/registertoolchainoperation.cpp
deleted file mode 100644
index 0caf1451b..000000000
--- a/src/libs/installer/registertoolchainoperation.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "registertoolchainoperation.h"
-
-#include "persistentsettings.h"
-#include "packagemanagercore.h"
-#include "qtcreator_constants.h"
-#include "qtcreatorpersistentsettings.h"
-
-#include <QtCore/QDebug>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtCore/QSettings>
-#include <QtCore/QString>
-
-using namespace QInstaller;
-
-using namespace ProjectExplorer;
-
-RegisterToolChainOperation::RegisterToolChainOperation()
-{
- setName(QLatin1String("RegisterToolChain"));
-}
-
-void RegisterToolChainOperation::backup()
-{
-}
-
-bool RegisterToolChainOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() < 4) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("at least 4"), QLatin1String("")));
- return false;
- }
-
- QString toolChainsXmlFilePath;
-
- PackageManagerCore *const core = value(QLatin1String("installer")).value<PackageManagerCore*>();
- if (!core) {
- setError(UserDefinedError);
- setErrorString(tr("Needed installer object in '%1' operation is empty.").arg(name()));
- return false;
- }
- if (core->value(scQtCreatorInstallerToolchainsFile).isEmpty()) {
- setError(UserDefinedError);
- setErrorString(tr("There is no value set for '%1' on the installer object.").arg(
- scQtCreatorInstallerToolchainsFile));
- return false;
- }
- toolChainsXmlFilePath = core->value(scQtCreatorInstallerToolchainsFile);
-
- QtCreatorToolChain toolChain;
-
- int argCounter = 0;
- toolChain.key = args.at(argCounter++); //Qt SDK:gccPath
- toolChain.type = args.at(argCounter++); //where this toolchain is defined in QtCreator
- toolChain.displayName = args.at(argCounter++); //nice special Toolchain (Qt SDK)
- toolChain.abiString = args.at(argCounter++); //x86-windows-msys-pe-32bit
- toolChain.compilerPath = QDir::toNativeSeparators(args.at(argCounter++)); //gccPath
- if (args.count() > argCounter)
- toolChain.debuggerPath = QDir::toNativeSeparators(args.at(argCounter++));
- if (args.count() > argCounter)
- toolChain.armVersion = args.at(argCounter++);
- if (args.count() > argCounter)
- toolChain.force32Bit = args.at(argCounter++);
-
- QtCreatorPersistentSettings creatorToolChainSettings;
-
- if (!creatorToolChainSettings.init(toolChainsXmlFilePath)) {
- setError(UserDefinedError);
- setErrorString(tr("Can't read from tool chains xml file(%1) correctly.")
- .arg(toolChainsXmlFilePath));
- return false;
- }
-
- if (!creatorToolChainSettings.addToolChain(toolChain)) {
- setError(InvalidArguments);
- setErrorString(tr("Some arguments are not right in %1 operation.")
- .arg(name()).arg(args.count()));
- return false;
- }
- return creatorToolChainSettings.save();
-}
-
-bool RegisterToolChainOperation::undoOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() < 4) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, minimum 4 expected.")
- .arg(name()).arg(args.count()));
- return false;
- }
-
- PackageManagerCore *const core = value(QLatin1String("installer")).value<PackageManagerCore*>();
- if (!core) {
- setError(UserDefinedError);
- setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name()));
- return false;
- }
-
- // default value is the old value to keep the possibility that old saved operations can run undo
-#ifdef Q_OS_MAC
- QString toolChainsXmlFilePath = core->value(scQtCreatorInstallerToolchainsFile,
- QString::fromLatin1("%1/Qt Creator.app/Contents/Resources/QtProject/toolChains.xml").arg(
- core->value(QLatin1String("TargetDir"))));
-#else
- QString toolChainsXmlFilePath = core->value(scQtCreatorInstallerToolchainsFile,
- QString::fromLatin1("%1/QtCreator/share/qtcreator/QtProject/toolChains.xml").arg(core->value(
- QLatin1String("TargetDir"))));
-#endif
-
- QtCreatorToolChain toolChain;
-
- int argCounter = 0;
- toolChain.key = args.at(argCounter++); //Qt SDK:gccPath
- toolChain.type = args.at(argCounter++); //where this toolchain is defined in QtCreator
- toolChain.displayName = args.at(argCounter++); //nice special Toolchain (Qt SDK)
- toolChain.abiString = args.at(argCounter++); //x86-windows-msys-pe-32bit
- toolChain.compilerPath = QDir::toNativeSeparators(args.at(argCounter++)); //gccPath
- if (args.count() > argCounter)
- toolChain.debuggerPath = QDir::toNativeSeparators(args.at(argCounter++));
- if (args.count() > argCounter)
- toolChain.armVersion = args.at(argCounter++);
- if (args.count() > argCounter)
- toolChain.force32Bit = args.at(argCounter++);
-
- QtCreatorPersistentSettings creatorToolChainSettings;
-
- if (!creatorToolChainSettings.init(toolChainsXmlFilePath)) {
- setError(UserDefinedError);
- setErrorString(tr("Can't read from tool chains xml file(%1) correctly.")
- .arg(toolChainsXmlFilePath));
- return false;
- }
-
- if (!creatorToolChainSettings.removeToolChain(toolChain)) {
- setError(InvalidArguments);
- setErrorString(tr("Some arguments are not right in %1 operation.")
- .arg(name()).arg(args.count()));
- return false;
- }
- return creatorToolChainSettings.save();
-}
-
-bool RegisterToolChainOperation::testOperation()
-{
- return true;
-}
-
-Operation *RegisterToolChainOperation::clone() const
-{
- return new RegisterToolChainOperation();
-}
diff --git a/src/libs/installer/registertoolchainoperation.h b/src/libs/installer/registertoolchainoperation.h
deleted file mode 100644
index bd745adfb..000000000
--- a/src/libs/installer/registertoolchainoperation.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef REGISTERTOOLCHAINOPERATION_H
-#define REGISTERTOOLCHAINOPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-/*!
- Arguments:
- * SDK Path - to find the QtCreator installation
- * ToolChainKey - is the internal QtCreator settings key usually: GccToolChain
- * toolchain type - where this toolchain is defined in QtCreator
- * ProjectExplorer.ToolChain.Gcc ProjectExplorer.ToolChain.Mingw
- * ProjectExplorer.ToolChain.LinuxIcc ProjectExplorer.ToolChain.Msvc
- * Qt4ProjectManager.ToolChain.GCCE Qt4ProjectManager.ToolChain.Maemo
- * display name - the name how it will be displayed in QtCreator
- * application binary interface - this is an internal creator typ as a String CPU-OS-OS_FLAVOR-BINARY_FORMAT-WORD_WIDTH
- * CPU: arm x86 mips ppc itanium
- * OS: linux macos symbian unix windows
- * OS_FLAVOR: generic maemo meego generic device emulator generic msvc2005 msvc2008 msvc2010 msys ce
- * BINARY_FORMAT: elf pe mach_o qml_rt
- * WORD_WIDTH: 8 16 32 64
- * compiler path - the binary which is used as the compiler
- * debugger path - the binary which is used as the debugger
-*/
-class RegisterToolChainOperation : public Operation
-{
-public:
- RegisterToolChainOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace QInstaller
-
-#endif // REGISTERTOOLCHAINOPERATION_H
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp
index b6a8a971a..e85ce9671 100644
--- a/src/libs/installer/scriptengine.cpp
+++ b/src/libs/installer/scriptengine.cpp
@@ -162,16 +162,19 @@ QScriptValue qFileDialogGetExistingDirectory(QScriptContext *context, QScriptEng
QScriptValue qFileDialogGetOpenFileName(QScriptContext *context, QScriptEngine *engine)
{
Q_UNUSED(engine);
- const QScriptValue check = checkArguments(context, 0, 2);
+ const QScriptValue check = checkArguments(context, 0, 3);
if (check.isError())
return check;
QString caption;
QString dir;
+ QString fileNameFilter;
if (context->argumentCount() > 0)
caption = context->argument(0).toString();
if (context->argumentCount() > 1)
dir = context->argument(1).toString();
- return QFileDialog::getExistingDirectory(0, caption, dir);
+ if (context->argumentCount() > 2)
+ fileNameFilter = context->argument(2).toString();
+ return QFileDialog::getOpenFileName(0, caption, dir, fileNameFilter);
}
} //namespace QInstaller
@@ -200,6 +203,8 @@ ScriptEngine::ScriptEngine(PackageManagerCore *core)
QScriptValue fileDialog = newArray();
fileDialog.setProperty(QLatin1String("getExistingDirectory"),
newFunction(qFileDialogGetExistingDirectory));
+ fileDialog.setProperty(QLatin1String("getOpenFileName"),
+ newFunction(qFileDialogGetOpenFileName));
globalObject().setProperty(QLatin1String("QFileDialog"), fileDialog);
const QList<Component*> components = m_core->availableComponents();
diff --git a/src/libs/installer/setdemospathonqtoperation.cpp b/src/libs/installer/setdemospathonqtoperation.cpp
deleted file mode 100644
index d558b3e21..000000000
--- a/src/libs/installer/setdemospathonqtoperation.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "setdemospathonqtoperation.h"
-
-#include "qtpatch.h"
-
-#include <QtCore/QDir>
-#include <QtCore/QSettings>
-#include <QtCore/QDebug>
-
-using namespace QInstaller;
-
-SetDemosPathOnQtOperation::SetDemosPathOnQtOperation()
-{
- setName(QLatin1String("SetDemosPathOnQt"));
-}
-
-void SetDemosPathOnQtOperation::backup()
-{
-}
-
-bool SetDemosPathOnQtOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() != 2) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String("")));
- return false;
- }
-
- const QString qtDir = args.at(0);
- QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8();
-
- QString qmakePath = qtDir + QLatin1String("/bin/qmake");
-#ifdef Q_OS_WIN
- qmakePath = qmakePath + QLatin1String(".exe");
-#endif
-
- QByteArray qmakeOutput;
- QHash<QString, QByteArray> qmakeValueHash = QtPatch::qmakeValues(qmakePath, &qmakeOutput);
-
- if (qmakeValueHash.isEmpty()) {
- setError(UserDefinedError);
- setErrorString(tr("The output of \n'%1 -query'\nis not parseable. Please file a bugreport with this "
- "dialog at https://bugreports.qt-project.org.\noutput: %2").arg(QDir::toNativeSeparators(qmakePath),
- QString::fromUtf8(qmakeOutput)));
- return false;
- }
-
- QByteArray oldValue = qmakeValueHash.value(QLatin1String("QT_INSTALL_DEMOS"));
- bool oldQtPathFromQMakeIsEmpty = oldValue.isEmpty();
- if (oldQtPathFromQMakeIsEmpty) {
- qDebug() << "qpatch: warning: It was not possible to get the old values from" << qmakePath;
- }
-
- if (newValue.size() >= 255) {
- setError(UserDefinedError);
- setErrorString(tr("Qt patch error: new Qt demo path '%1'\nneeds to be less than 255 characters.")
- .arg(QString::fromLocal8Bit(newValue)) );
- return false;
- }
-
- QString qtConfPath = qtDir + QLatin1String("/bin/qt.conf");
- if (QFile::exists(qtConfPath)) {
- QSettings settings(qtConfPath, QSettings::IniFormat);
- settings.setValue(QLatin1String("Paths/Demos"), QString::fromUtf8(newValue));
- }
-
- oldValue = QByteArray("qt_demopath=%1").replace("%1", oldValue);
- newValue = QByteArray("qt_demopath=%1").replace("%1", newValue);
-
- bool isPatched = QtPatch::patchBinaryFile(qmakePath, oldValue, newValue);
- if (!isPatched) {
- qDebug() << "qpatch: warning: could not patch the demo path in" << qmakePath;
- }
-
- return true;
-}
-
-bool SetDemosPathOnQtOperation::undoOperation()
-{
- return true;
-}
-
-bool SetDemosPathOnQtOperation::testOperation()
-{
- return true;
-}
-
-Operation *SetDemosPathOnQtOperation::clone() const
-{
- return new SetDemosPathOnQtOperation();
-}
-
diff --git a/src/libs/installer/setdemospathonqtoperation.h b/src/libs/installer/setdemospathonqtoperation.h
deleted file mode 100644
index 27d25c9f9..000000000
--- a/src/libs/installer/setdemospathonqtoperation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef SETDEMOSPATHONQTOPERATION_H
-#define SETDEMOSPATHONQTOPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-class SetDemosPathOnQtOperation : public Operation
-{
-public:
- SetDemosPathOnQtOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace
-
-#endif // SETDEMOSPATHONQTOPERATION_H
diff --git a/src/libs/installer/setexamplespathonqtoperation.cpp b/src/libs/installer/setexamplespathonqtoperation.cpp
deleted file mode 100644
index e73aed25a..000000000
--- a/src/libs/installer/setexamplespathonqtoperation.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "setexamplespathonqtoperation.h"
-
-#include "qtpatch.h"
-
-#include <QtCore/QDir>
-#include <QtCore/QSettings>
-#include <QtCore/QDebug>
-
-using namespace QInstaller;
-
-SetExamplesPathOnQtOperation::SetExamplesPathOnQtOperation()
-{
- setName(QLatin1String("SetExamplesPathOnQt"));
-}
-
-void SetExamplesPathOnQtOperation::backup()
-{
-}
-
-bool SetExamplesPathOnQtOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() != 2) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String("")));
- return false;
- }
-
- const QString qtDir = args.at(0);
- QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8();
-
- QString qmakePath = qtDir + QLatin1String("/bin/qmake");
-#ifdef Q_OS_WIN
- qmakePath = qmakePath + QLatin1String(".exe");
-#endif
-
- QByteArray qmakeOutput;
- QHash<QString, QByteArray> qmakeValueHash = QtPatch::qmakeValues(qmakePath, &qmakeOutput);
-
- if (qmakeValueHash.isEmpty()) {
- setError(UserDefinedError);
- setErrorString(tr("The output of \n'%1 -query'\nis not parseable. Please file a bugreport with this "
- "dialog at https://bugreports.qt-project.org.\noutput: %2").arg(QDir::toNativeSeparators(qmakePath),
- QString::fromUtf8(qmakeOutput)));
- return false;
- }
-
- QByteArray oldValue = qmakeValueHash.value(QLatin1String("QT_INSTALL_EXAMPLES"));
- bool oldQtPathFromQMakeIsEmpty = oldValue.isEmpty();
- if (oldQtPathFromQMakeIsEmpty) {
- qDebug() << "qpatch: warning: It was not possible to get the old values from" << qmakePath;
- }
-
- if (newValue.size() >= 255) {
- setError(UserDefinedError);
- setErrorString(tr("Qt patch error: new Qt example path '%1'\nneeds to be less than 255 characters.")
- .arg(QString::fromLocal8Bit(newValue)));
- return false;
- }
-
- QString qtConfPath = qtDir + QLatin1String("/bin/qt.conf");
-
- if (QFile::exists(qtConfPath)) {
- QSettings settings(qtConfPath, QSettings::IniFormat);
- settings.setValue( QLatin1String("Paths/Examples"), QString::fromUtf8(newValue));
- }
-
- oldValue = QByteArray("qt_xmplpath=%1").replace("%1", oldValue);
- newValue = QByteArray("qt_xmplpath=%1").replace("%1", newValue);
-
- bool isPatched = QtPatch::patchBinaryFile(qmakePath, oldValue, newValue);
- if (!isPatched) {
- qDebug() << "qpatch: warning: could not patch the example path in" << qmakePath;
- }
-
- return true;
-}
-
-bool SetExamplesPathOnQtOperation::undoOperation()
-{
- return true;
-}
-
-bool SetExamplesPathOnQtOperation::testOperation()
-{
- return true;
-}
-
-Operation *SetExamplesPathOnQtOperation::clone() const
-{
- return new SetExamplesPathOnQtOperation();
-}
-
diff --git a/src/libs/installer/setexamplespathonqtoperation.h b/src/libs/installer/setexamplespathonqtoperation.h
deleted file mode 100644
index 7f2df6b4e..000000000
--- a/src/libs/installer/setexamplespathonqtoperation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef SETEXAMPLESPATHONQTOPERATION_H
-#define SETEXAMPLESPATHONQTOPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-class SetExamplesPathOnQtOperation : public Operation
-{
-public:
- SetExamplesPathOnQtOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace
-
-#endif // SETEXAMPLESPATHONQTOPERATION_H
diff --git a/src/libs/installer/setimportspathonqtcoreoperation.cpp b/src/libs/installer/setimportspathonqtcoreoperation.cpp
deleted file mode 100644
index 685aee846..000000000
--- a/src/libs/installer/setimportspathonqtcoreoperation.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "setimportspathonqtcoreoperation.h"
-
-#include "qtpatch.h"
-
-#include <QtCore/QByteArrayMatcher>
-#include <QtCore/QDir>
-#include <QtCore/QDebug>
-
-using namespace QInstaller;
-
-namespace {
- QByteArray getOldValue(const QString &binaryPath)
- {
- QFileInfo fileInfo(binaryPath);
-
- if (!fileInfo.exists()) {
- qDebug() << QString::fromLatin1("qpatch: warning: file '%1' not found").arg(binaryPath);
- return QByteArray();
- }
-
-
- QFile file(binaryPath);
- int readOpenCount = 0;
- while (!file.open(QFile::ReadOnly) && readOpenCount < 20000) {
- ++readOpenCount;
- qApp->processEvents();
- }
- Q_ASSERT(file.isOpen());
- if (!file.isOpen()) {
- qDebug() << QString::fromLatin1("qpatch: warning: file '%1' can not be opened as ReadOnly.").arg(
- binaryPath);
- qDebug() << file.errorString();
- return QByteArray();
- }
-
- const QByteArray source = file.readAll();
- file.close();
-
- int offset = 0;
- QByteArray searchValue("qt_impspath=");
- QByteArrayMatcher byteArrayMatcher(searchValue);
- offset = byteArrayMatcher.indexIn(source, offset);
- Q_ASSERT(offset > 0);
- if (offset == -1)
- return QByteArray();
-
- int stringEndPosition = offset;
- while(source.at(stringEndPosition++) != '\0') {}
- // between the search string and the first \0 is the QByteArray we are looking for
- return source.mid(offset + searchValue.size(), stringEndPosition - offset);
- }
-}
-
-SetImportsPathOnQtCoreOperation::SetImportsPathOnQtCoreOperation()
-{
- setName(QLatin1String("SetImportsPathOnQtCore"));
-}
-
-void SetImportsPathOnQtCoreOperation::backup()
-{
-}
-
-bool SetImportsPathOnQtCoreOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() != 2) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String("")));
- return false;
- }
-
- const QString qtCoreLibraryDir = args.at(0);
- const QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8();
-
- if (newValue.size() >= 255) {
- setError(UserDefinedError);
- setErrorString(tr("Qt patch error: new Qt imports path '%1'\nneeds to be less than 255 characters.")
- .arg(QString::fromLocal8Bit(newValue)));
- return false;
- }
- QStringList libraryFiles;
-#ifdef Q_OS_WIN
- libraryFiles << QString::fromLatin1("%1/QtCore4.dll").arg(qtCoreLibraryDir);
- libraryFiles << QString::fromLatin1("%1/QtCore4d.dll").arg(qtCoreLibraryDir);
-#else
- libraryFiles << qtCoreLibraryDir + QLatin1String("/libQtCore.so");
-#endif
- foreach (const QString coreLibrary, libraryFiles) {
- if (QFile::exists(coreLibrary)) {
- QByteArray oldValue(getOldValue(coreLibrary));
- Q_ASSERT(!oldValue.isEmpty());
- oldValue = QByteArray("qt_impspath=%1").replace("%1", oldValue);
- QByteArray adjutedNewValue = QByteArray("qt_impspath=%1").replace("%1", newValue);
-
- bool isPatched = QtPatch::patchBinaryFile(coreLibrary, oldValue, adjutedNewValue);
- if (!isPatched) {
- qDebug() << "qpatch: warning: could not patch the imports path in" << coreLibrary;
- }
- }
- }
-
- return true;
-}
-
-bool SetImportsPathOnQtCoreOperation::undoOperation()
-{
- return true;
-}
-
-bool SetImportsPathOnQtCoreOperation::testOperation()
-{
- return true;
-}
-
-Operation *SetImportsPathOnQtCoreOperation::clone() const
-{
- return new SetImportsPathOnQtCoreOperation();
-}
-
diff --git a/src/libs/installer/setimportspathonqtcoreoperation.h b/src/libs/installer/setimportspathonqtcoreoperation.h
deleted file mode 100644
index 7dbb9c7d3..000000000
--- a/src/libs/installer/setimportspathonqtcoreoperation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef SETIMPORTSPATHONQTCOREOPERATION_H
-#define SETIMPORTSPATHONQTCOREOPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-class SetImportsPathOnQtCoreOperation : public Operation
-{
-public:
- SetImportsPathOnQtCoreOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace
-
-#endif // SETIMPORTSPATHONQTCOREOPERATION_H
diff --git a/src/libs/installer/setpathonqtcoreoperation.cpp b/src/libs/installer/setpathonqtcoreoperation.cpp
deleted file mode 100644
index c6950246d..000000000
--- a/src/libs/installer/setpathonqtcoreoperation.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "setpathonqtcoreoperation.h"
-
-#include "qtpatch.h"
-
-#include <QtCore/QByteArrayMatcher>
-#include <QtCore/QDir>
-#include <QtCore/QDebug>
-
-using namespace QInstaller;
-
-namespace {
- QByteArray getOldValue(const QString &binaryPath, const QByteArray &typeValue)
- {
- QFileInfo fileInfo(binaryPath);
-
- if (!fileInfo.exists()) {
- qDebug() << QString::fromLatin1("qpatch: warning: file '%1' not found.").arg(
- binaryPath);
- return QByteArray();
- }
-
- QFile file(binaryPath);
- int readOpenCount = 0;
- while (!file.open(QFile::ReadOnly) && readOpenCount < 20000) {
- ++readOpenCount;
- qApp->processEvents();
- }
- Q_ASSERT(file.isOpen());
- if (!file.isOpen()) {
- qDebug() << QString::fromLatin1("qpatch: warning: file '%1' can not be opened as ReadOnly.").arg(
- binaryPath);
- qDebug() << file.errorString();
- return QByteArray();
- }
-
- const QByteArray source = file.readAll();
- file.close();
-
- int offset = 0;
- QByteArray searchValue = typeValue;
- searchValue.append("=");
- QByteArrayMatcher byteArrayMatcher(searchValue);
- offset = byteArrayMatcher.indexIn(source, offset);
- Q_ASSERT(offset > 0);
- if (offset == -1)
- return QByteArray();
-
- int stringEndPosition = offset;
-
- // go to the position where the other data starts
- while (source.at(stringEndPosition++) != '\0') {}
-
- // between the search string and the first \0 is the QByteArray we are looking for
- return source.mid(offset + searchValue.size(), stringEndPosition - offset);
- }
-}
-
-SetPathOnQtCoreOperation::SetPathOnQtCoreOperation()
-{
- setName(QLatin1String("SetPathOnQtCore"));
-}
-
-void SetPathOnQtCoreOperation::backup()
-{
-}
-
-bool SetPathOnQtCoreOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() != 3) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("exactly 3"), QLatin1String("")));
- return false;
- }
-
- const QString qtCoreLibraryDir = args.at(0);
- const QByteArray typeValue(args.at(1).toUtf8());
- const QByteArray newValue = QDir::toNativeSeparators(args.at(2)).toUtf8();
-
- QStringList possibleTypes;
- possibleTypes << QLatin1String("qt_prfxpath")
- << QLatin1String("qt_docspath")
- << QLatin1String("qt_hdrspath")
- << QLatin1String("qt_libspath")
- << QLatin1String("qt_binspath")
- << QLatin1String("qt_plugpath")
- << QLatin1String("qt_impspath")
- << QLatin1String("qt_datapath")
- << QLatin1String("qt_trnspath")
- << QLatin1String("qt_xmplpath")
- << QLatin1String("qt_demopath");
-
- if (!possibleTypes.contains(QString::fromUtf8(typeValue))) {
- setError(InvalidArguments);
- setErrorString(tr("The second type/value needs to be one of: %1").arg(possibleTypes.join(
- QLatin1String(", "))));
- return false;
- }
-
- if (newValue.size() >= 255) {
- qDebug() << "qpatch: error: newQtDir needs to be less than 255 characters.";
- return false;
- }
- QStringList libraryFiles;
-#ifdef Q_OS_WIN
- libraryFiles << QString::fromLatin1("%1/QtCore4.dll").arg(qtCoreLibraryDir);
- libraryFiles << QString::fromLatin1("%1/QtCore4d.dll").arg(qtCoreLibraryDir);
-#else
- libraryFiles << qtCoreLibraryDir + QLatin1String("/libQtCore.so");
-#endif
- foreach (const QString coreLibrary, libraryFiles) {
- if (QFile::exists(coreLibrary)) {
- QByteArray oldValue(getOldValue(coreLibrary, typeValue));
- Q_ASSERT(!oldValue.isEmpty());
- oldValue = QByteArray("%0=%1").replace("%0", typeValue).replace("%1", oldValue);
- QByteArray adjutedNewValue =
- QByteArray("%0=%1").replace("%0", typeValue).replace("%1", newValue);
-
- bool isPatched = QtPatch::patchBinaryFile(coreLibrary, oldValue, adjutedNewValue);
- if (!isPatched) {
- qDebug() << "qpatch: warning: could not patch the plugin path in" << coreLibrary;
- }
- }
- }
-
- return true;
-}
-
-bool SetPathOnQtCoreOperation::undoOperation()
-{
- return true;
-}
-
-bool SetPathOnQtCoreOperation::testOperation()
-{
- return true;
-}
-
-Operation *SetPathOnQtCoreOperation::clone() const
-{
- return new SetPathOnQtCoreOperation();
-}
-
diff --git a/src/libs/installer/setpathonqtcoreoperation.h b/src/libs/installer/setpathonqtcoreoperation.h
deleted file mode 100644
index 1b63c7ede..000000000
--- a/src/libs/installer/setpathonqtcoreoperation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef SETPATHONQTCOREOPERATION_H
-#define SETPATHONQTCOREOPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-class SetPathOnQtCoreOperation : public Operation
-{
-public:
- SetPathOnQtCoreOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace
-
-#endif // SETPATHONQTCOREOPERATION_H
diff --git a/src/libs/installer/setpluginpathonqtcoreoperation.cpp b/src/libs/installer/setpluginpathonqtcoreoperation.cpp
deleted file mode 100644
index cafdda24c..000000000
--- a/src/libs/installer/setpluginpathonqtcoreoperation.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "setpluginpathonqtcoreoperation.h"
-
-#include "qtpatch.h"
-
-#include <QtCore/QByteArrayMatcher>
-#include <QtCore/QDir>
-#include <QtCore/QDebug>
-
-using namespace QInstaller;
-
-namespace {
- QByteArray getOldValue(const QString &binaryPath)
- {
- QFileInfo fileInfo(binaryPath);
-
- if (!fileInfo.exists()) {
- qDebug() << QString::fromLatin1("qpatch: warning: file '%1' not found").arg(binaryPath);
- return QByteArray();
- }
-
- QFile file(binaryPath);
- int readOpenCount = 0;
- while (!file.open(QFile::ReadOnly) && readOpenCount < 20000) {
- ++readOpenCount;
- qApp->processEvents();
- }
- Q_ASSERT(file.isOpen());
- if (!file.isOpen()) {
- qDebug() << QString::fromLatin1("qpatch: warning: file '%1' can not be opened as ReadOnly.").arg(
- binaryPath);
- qDebug() << file.errorString();
- return QByteArray();
- }
-
- const QByteArray source = file.readAll();
- file.close();
-
- int offset = 0;
- QByteArray searchValue("qt_plugpath=");
- QByteArrayMatcher byteArrayMatcher(searchValue);
- offset = byteArrayMatcher.indexIn(source, offset);
- Q_ASSERT(offset > 0);
- if (offset == -1)
- return QByteArray();
-
- int stringEndPosition = offset;
- while(source.at(stringEndPosition++) != '\0') {}
- // between the search string and the first \0 is the QByteArray we are looking for
- return source.mid(offset + searchValue.size(), stringEndPosition - offset);
- }
-}
-
-SetPluginPathOnQtCoreOperation::SetPluginPathOnQtCoreOperation()
-{
- setName(QLatin1String("SetPluginPathOnQtCore"));
-}
-
-void SetPluginPathOnQtCoreOperation::backup()
-{
-}
-
-bool SetPluginPathOnQtCoreOperation::performOperation()
-{
- const QStringList args = arguments();
-
- if (args.count() != 2) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String("")));
- return false;
- }
-
- const QString qtCoreLibraryDir = args.at(0);
- const QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8();
-
- if (newValue.size() >= 255) {
- setError(UserDefinedError);
- setErrorString(tr("Qt patch error: new Qt plugin path '%1'\nneeds to be less than 255 characters.")
- .arg(QString::fromLocal8Bit(newValue)));
- return false;
- }
- QStringList libraryFiles;
-#ifdef Q_OS_WIN
- libraryFiles << QString::fromLatin1("%1/QtCore4.dll").arg(qtCoreLibraryDir);
- libraryFiles << QString::fromLatin1("%1/QtCore4d.dll").arg(qtCoreLibraryDir);
-#else
- libraryFiles << qtCoreLibraryDir + QLatin1String("/libQtCore.so");
-#endif
- foreach (const QString &coreLibrary, libraryFiles) {
- if (QFile::exists(coreLibrary)) {
- QByteArray oldValue(getOldValue(coreLibrary));
- Q_ASSERT(!oldValue.isEmpty());
- oldValue = QByteArray("qt_plugpath=%1").replace("%1", oldValue);
- QByteArray adjutedNewValue = QByteArray("qt_plugpath=%1").replace("%1", newValue);
-
- bool isPatched = QtPatch::patchBinaryFile(coreLibrary, oldValue, adjutedNewValue);
- if (!isPatched)
- qDebug() << "qpatch: warning: could not patch the plugin path in" << coreLibrary;
- }
- }
-
- return true;
-}
-
-bool SetPluginPathOnQtCoreOperation::undoOperation()
-{
- return true;
-}
-
-bool SetPluginPathOnQtCoreOperation::testOperation()
-{
- return true;
-}
-
-Operation *SetPluginPathOnQtCoreOperation::clone() const
-{
- return new SetPluginPathOnQtCoreOperation();
-}
-
diff --git a/src/libs/installer/setpluginpathonqtcoreoperation.h b/src/libs/installer/setpluginpathonqtcoreoperation.h
deleted file mode 100644
index 99d9c4bfe..000000000
--- a/src/libs/installer/setpluginpathonqtcoreoperation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef SETPLUGINPATHONQTCOREOPERATION_H
-#define SETPLUGINPATHONQTCOREOPERATION_H
-
-#include "qinstallerglobal.h"
-
-namespace QInstaller {
-
-class SetPluginPathOnQtCoreOperation : public Operation
-{
-public:
- SetPluginPathOnQtCoreOperation();
-
- void backup();
- bool performOperation();
- bool undoOperation();
- bool testOperation();
- Operation *clone() const;
-};
-
-} // namespace
-
-#endif // SETPLUGINPATHONQTCOREOPERATION_H
diff --git a/src/libs/installer/setqtcreatorvalueoperation.cpp b/src/libs/installer/setqtcreatorvalueoperation.cpp
index 28e0f9134..4f2bbfbc1 100644
--- a/src/libs/installer/setqtcreatorvalueoperation.cpp
+++ b/src/libs/installer/setqtcreatorvalueoperation.cpp
@@ -110,7 +110,7 @@ bool SetQtCreatorValueOperation::performOperation()
if (!group.isEmpty())
settings.endGroup();
- settings.sync(); //be save ;)
+ settings.sync(); //be safe ;)
return true;
}