summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-07-05 15:36:58 +0200
committerkh1 <qt-info@nokia.com>2011-07-05 15:36:58 +0200
commiteb713a82c1665f5fa1439f7fe9434c4cd60ad8cb (patch)
tree2fda7eef7c16592f402da6c5dc89f2936a5f3216 /installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
parent44f39d04c04fe061807f8a36aebc486a787d126e (diff)
Cleanup. Use the typedef, no functional change intended.
Diffstat (limited to 'installerbuilder/libinstaller/setexamplespathonqtoperation.cpp')
-rw-r--r--installerbuilder/libinstaller/setexamplespathonqtoperation.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp b/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
index 17cceadeb..26b2d4faa 100644
--- a/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
+++ b/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
@@ -32,12 +32,11 @@
**************************************************************************/
#include "setexamplespathonqtoperation.h"
-#include "qtpatch.h"
-#include "qinstallerglobal.h"
#include "common/utils.h"
+#include "qtpatch.h"
-#include <QDir>
-#include <QSettings>
+#include <QtCore/QDir>
+#include <QtCore/QSettings>
using namespace QInstaller;
@@ -60,8 +59,8 @@ bool SetExamplesPathOnQtOperation::performOperation()
if (args.count() != 2) {
setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, exact 2 expected.")
- .arg(name()).arg(arguments().count()));
+ setErrorString(tr("Invalid arguments in %0: %1 arguments given, exact 2 expected.").arg(name())
+ .arg(arguments().count()));
return false;
}
@@ -76,26 +75,25 @@ bool SetExamplesPathOnQtOperation::performOperation()
QByteArray qmakeOutput;
QHash<QString, QByteArray> qmakeValueHash = QtPatch::qmakeValues(qmakePath, &qmakeOutput);
- if (qmakeValueHash.isEmpty())
- {
+ if (qmakeValueHash.isEmpty()) {
setError(UserDefinedError);
- setErrorString(tr("The output of \n%1 -query\n" \
- "is not parseable. Please make a bugreport with this dialog http://bugreports.qt.nokia.com.\n" \
- "output: \"%2\"").arg(QDir::toNativeSeparators(qmakePath), QString::fromUtf8(qmakeOutput)));
+ setErrorString(tr("The output of \n%1 -query\n is not parseable. Please file a bugreport with this "
+ "dialog http://bugreports.qt.nokia.com.\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) {
- verbose() << "qpatch: warning: It was not able to get the old values from "
- << qPrintable(qmakePath) << std::endl;
+ verbose() << "qpatch: warning: It was not able to get the old values from " << qPrintable(qmakePath)
+ << std::endl;
}
if (255 < newValue.size()) {
setError(UserDefinedError);
- setErrorString(tr("Qt patch error: new Qt example path(%1)\n" \
- "needs to be less than 255 characters.").arg(QString::fromLocal8Bit(newValue)));
+ setErrorString(tr("Qt patch error: new Qt example path(%1)\n needs to be less than 255 characters.")
+ .arg(QString::fromLocal8Bit(newValue)));
return false;
}
@@ -111,7 +109,8 @@ bool SetExamplesPathOnQtOperation::performOperation()
bool isPatched = QtPatch::patchBinaryFile(qmakePath, oldValue, newValue);
if (!isPatched) {
- QInstaller::verbose() << "qpatch: warning: could not patched the example path in " << qPrintable(qmakePath) << std::endl;
+ QInstaller::verbose() << "qpatch: warning: could not patched the example path in "
+ << qPrintable(qmakePath) << std::endl;
}
return true;
@@ -127,7 +126,7 @@ bool SetExamplesPathOnQtOperation::testOperation()
return true;
}
-KDUpdater::UpdateOperation* SetExamplesPathOnQtOperation::clone() const
+Operation *SetExamplesPathOnQtOperation::clone() const
{
return new SetExamplesPathOnQtOperation();
}