summaryrefslogtreecommitdiffstats
path: root/installerbuilder
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-08-11 19:29:53 +0200
committerkh1 <qt-info@nokia.com>2011-08-12 11:03:11 +0200
commit6ba25f5e1b4673595837d71eea7f6ef81d50fd3e (patch)
treee1d7dbcd04999fcb51116a5394076f77878cef8c /installerbuilder
parent9b79816af33ae21a0ba98259abec74f1452edc5b (diff)
Fix wrong whitespaces.
Diffstat (limited to 'installerbuilder')
-rw-r--r--installerbuilder/libinstaller/component.cpp24
-rw-r--r--installerbuilder/libinstaller/packagemanagercore.cpp10
-rw-r--r--installerbuilder/libinstaller/packagemanagercore_p.cpp22
-rw-r--r--installerbuilder/libinstaller/packagemanagercore_p.h11
-rw-r--r--installerbuilder/libinstaller/packagemanagergui.cpp54
5 files changed, 60 insertions, 61 deletions
diff --git a/installerbuilder/libinstaller/component.cpp b/installerbuilder/libinstaller/component.cpp
index 89739291e..12676c5ff 100644
--- a/installerbuilder/libinstaller/component.cpp
+++ b/installerbuilder/libinstaller/component.cpp
@@ -113,7 +113,7 @@ void Component::loadDataFromPackage(const LocalPackage &package)
setValue(scUncompressedSize, QString::number(package.uncompressedSize));
QString dependstr = QLatin1String("");
- foreach (const QString& val, package.dependencies)
+ foreach (const QString &val, package.dependencies)
dependstr += val + QLatin1String(",");
if (package.dependencies.count() > 0)
@@ -263,7 +263,7 @@ PackageManagerCore *Component::packageManagerCore() const
Returns the parent of this component. If this component is com.nokia.sdk.qt, its
parent is com.nokia.sdk, as far as this exists.
*/
-Component* Component::parentComponent() const
+Component *Component::parentComponent() const
{
return d->m_parentComponent;
}
@@ -272,7 +272,7 @@ Component* Component::parentComponent() const
Appends \a component as a child of this component. If \a component already has a parent,
it is removed from the previous parent.
*/
-void Component::appendComponent(Component* component)
+void Component::appendComponent(Component *component)
{
if (!component->isVirtual()) {
d->m_childComponents.append(component);
@@ -290,7 +290,7 @@ void Component::appendComponent(Component* component)
/*!
Removes \a component if it is a child of this component. The component object still exists after the
- function returns. It's up to the caller to delete the passed component.
+ function returns. It's up to the caller to delete the passed \a component.
*/
void Component::removeComponent(Component *component)
{
@@ -405,7 +405,7 @@ void Component::languageChanged()
\note The method is not called, if the current script context is the same method, to avoid
infinite recursion.
*/
-QScriptValue Component::callScriptMethod(const QString &methodName, const QScriptValueList& arguments) const
+QScriptValue Component::callScriptMethod(const QString &methodName, const QScriptValueList &arguments) const
{
if (!d->m_unexistingScriptMethods.value(methodName, true))
return QScriptValue();
@@ -435,7 +435,7 @@ QScriptValue Component::callScriptMethod(const QString &methodName, const QScrip
QLocale::name() name \endlink are loaded.
Read \ref componenttranslation for details.
*/
-void Component::loadTranslations(const QDir& directory, const QStringList& qms)
+void Component::loadTranslations(const QDir &directory, const QStringList &qms)
{
QDirIterator it(directory.path(), qms, QDir::Files);
while (it.hasNext()) {
@@ -455,7 +455,7 @@ void Component::loadTranslations(const QDir& directory, const QStringList& qms)
interface can be accessed via userInterfaces by using the class name set in the ui file.
Read \ref componentuserinterfaces for details.
*/
-void Component::loadUserInterfaces(const QDir& directory, const QStringList& uis)
+void Component::loadUserInterfaces(const QDir &directory, const QStringList &uis)
{
if (QApplication::type() == QApplication::Tty)
return;
@@ -471,7 +471,7 @@ void Component::loadUserInterfaces(const QDir& directory, const QStringList& uis
static QUiLoader loader;
loader.setTranslationEnabled(true);
loader.setLanguageChangeEnabled(true);
- QWidget* const w = loader.load(&file, MessageBoxHandler::currentBestSuitParent());
+ QWidget *const w = loader.load(&file, MessageBoxHandler::currentBestSuitParent());
d->m_userInterfaces.insert(w->objectName(), w);
}
}
@@ -507,7 +507,7 @@ QHash<QString, QPair<QString, QString> > Component::licenses() const
/*!
Returns the QWidget created for class \a name.
*/
-QWidget* Component::userInterface(const QString &name) const
+QWidget *Component::userInterface(const QString &name) const
{
return d->m_userInterfaces.value(name);
}
@@ -772,12 +772,12 @@ bool Component::operationsCreatedSuccessfully() const
return d->m_operationsCreatedSuccessfully;
}
-Operation* Component::createOperation(const QString &operation, const QString &parameter1,
+Operation *Component::createOperation(const QString &operation, const QString &parameter1,
const QString &parameter2, const QString &parameter3, const QString &parameter4, const QString &parameter5,
const QString &parameter6, const QString &parameter7, const QString &parameter8, const QString &parameter9,
const QString &parameter10)
{
- Operation* op = KDUpdater::UpdateOperationFactory::instance().create(operation);
+ Operation *op = KDUpdater::UpdateOperationFactory::instance().create(operation);
if (op == 0) {
const QMessageBox::StandardButton button =
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
@@ -1054,7 +1054,7 @@ QUrl Component::repositoryUrl() const
/*!
Sets this components #repositoryUrl.
*/
-void Component::setRepositoryUrl(const QUrl& url)
+void Component::setRepositoryUrl(const QUrl &url)
{
d->m_repositoryUrl = url;
}
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp
index be2965f72..077510212 100644
--- a/installerbuilder/libinstaller/packagemanagercore.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore.cpp
@@ -84,7 +84,7 @@ static QScriptValue checkArguments(QScriptContext* context, int amin, int amax)
}
static bool componentMatches(const Component *component, const QString &name,
- const QString& version = QString())
+ const QString &version = QString())
{
if (name.isEmpty() || component->name() != name)
return false;
@@ -469,7 +469,7 @@ void PackageManagerCore::rollBackInstallation()
packages.writeToDisk();
}
-bool PackageManagerCore::isFileExtensionRegistered(const QString& extension) const
+bool PackageManagerCore::isFileExtensionRegistered(const QString &extension) const
{
QSettingsWrapper settings(QLatin1String("HKEY_CLASSES_ROOT"), QSettingsWrapper::NativeFormat);
return settings.value(QString::fromLatin1(".%1/Default").arg(extension)).isValid();
@@ -873,12 +873,12 @@ bool PackageManagerCore::calculateComponentsToInstall() const
d->clearComponentsToInstall();
QList<Component*> components;
if (runMode() == UpdaterMode) {
- foreach(Component* component, updaterComponents()) {
+ foreach(Component *component, updaterComponents()) {
if (component->updateRequested())
components.append(component);
}
} else if (runMode() == AllMode) {
- foreach(Component* component, availableComponents()) {
+ foreach(Component *component, availableComponents()) {
if (component->installationRequested())
components.append(component);
}
@@ -1333,7 +1333,7 @@ bool PackageManagerCore::runPackageUpdater()
*/
void PackageManagerCore::languageChanged()
{
- foreach (Component* component, availableComponents())
+ foreach (Component *component, availableComponents())
component->languageChanged();
}
diff --git a/installerbuilder/libinstaller/packagemanagercore_p.cpp b/installerbuilder/libinstaller/packagemanagercore_p.cpp
index 19ef2f2ce..99fb67258 100644
--- a/installerbuilder/libinstaller/packagemanagercore_p.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore_p.cpp
@@ -336,7 +336,7 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component*
if (allComponentsAdded) {
// This means notAppendedComponents is empty, so all regular dependencies are resolved. Now we are
// looking for auto depend on components.
- foreach (Component* component, m_core->availableComponents()) {
+ foreach (Component *component, m_core->availableComponents()) {
if (!component->isInstalled() && !m_toInstallComponentIds.contains(component->name())
&& component->isAutoDependOn(m_toInstallComponentIds)) {
foundAutoDependOnList.append(component);
@@ -350,7 +350,7 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component*
return allComponentsAdded;
}
-bool PackageManagerCorePrivate::appendComponentToInstall(Component* component)
+bool PackageManagerCorePrivate::appendComponentToInstall(Component *component)
{
foreach (const QString &dependencyComponentName, component->dependencies()) {
//componentByName return 0 if dependencyComponentName contains a version which is not available
@@ -578,7 +578,7 @@ QByteArray PackageManagerCorePrivate::replaceVariables(const QByteArray &ba) con
\internal
Creates an update operation owned by the installer, not by any component.
*/
-Operation* PackageManagerCorePrivate::createOwnedOperation(const QString &type)
+Operation *PackageManagerCorePrivate::createOwnedOperation(const QString &type)
{
m_ownedOperations.append(KDUpdater::UpdateOperationFactory::instance().create(type));
return m_ownedOperations.last();
@@ -589,7 +589,7 @@ Operation* PackageManagerCorePrivate::createOwnedOperation(const QString &type)
Removes \a opertion from the operations owned by the installer, returns the very same operation if the
operation was found, otherwise 0.
*/
-Operation* PackageManagerCorePrivate::takeOwnedOperation(Operation *operation)
+Operation *PackageManagerCorePrivate::takeOwnedOperation(Operation *operation)
{
if (!m_ownedOperations.contains(operation))
return 0;
@@ -631,7 +631,7 @@ void PackageManagerCorePrivate::readUninstallerIniFile(const QString &targetDir)
void PackageManagerCorePrivate::stopProcessesForUpdates(const QList<Component*> &components)
{
QStringList processList;
- foreach (const Component* const i, components)
+ foreach (const Component *const i, components)
processList << m_core->replaceVariables(i->stopProcessForUpdateRequests());
qSort(processList);
@@ -676,7 +676,7 @@ int PackageManagerCorePrivate::countProgressOperations(const OperationList &oper
int PackageManagerCorePrivate::countProgressOperations(const QList<Component*> &components)
{
int operationCount = 0;
- foreach (Component* component, components)
+ foreach (Component *component, components)
operationCount += countProgressOperations(component->operations());
return operationCount;
@@ -685,9 +685,9 @@ int PackageManagerCorePrivate::countProgressOperations(const QList<Component*> &
void PackageManagerCorePrivate::connectOperationToInstaller(Operation *const operation, double operationPartSize)
{
Q_ASSERT(operationPartSize);
- QObject* const operationObject = dynamic_cast< QObject* >(operation);
+ QObject *const operationObject = dynamic_cast< QObject*> (operation);
if (operationObject != 0) {
- const QMetaObject* const mo = operationObject->metaObject();
+ const QMetaObject *const mo = operationObject->metaObject();
if (mo->indexOfSignal(QMetaObject::normalizedSignature("outputTextChanged(QString)")) > -1) {
connect(operationObject, SIGNAL(outputTextChanged(QString)), ProgressCoordinator::instance(),
SLOT(emitDetailTextChanged(QString)));
@@ -703,7 +703,7 @@ void PackageManagerCorePrivate::connectOperationToInstaller(Operation *const ope
}
}
-Operation* PackageManagerCorePrivate::createPathOperation(const QFileInfo &fileInfo,
+Operation *PackageManagerCorePrivate::createPathOperation(const QFileInfo &fileInfo,
const QString &componentName)
{
const bool isDir = fileInfo.isDir();
@@ -850,7 +850,7 @@ void PackageManagerCorePrivate::writeUninstaller(OperationList performedOperatio
const QString targetAppDirPath = QFileInfo(uninstallerName()).path();
if (!QDir().exists(targetAppDirPath)) {
// create the directory containing the uninstaller (like a bundle structor, on Mac...)
- Operation* op = createOwnedOperation(QLatin1String("Mkdir"));
+ Operation *op = createOwnedOperation(QLatin1String("Mkdir"));
op->setArguments(QStringList() << targetAppDirPath);
performOperationThreaded(op, Backup);
performOperationThreaded(op);
@@ -1573,7 +1573,7 @@ void PackageManagerCorePrivate::deleteUninstaller()
arguments << QLatin1String("//Nologo") << batchfile; // execute the batchfile
arguments << QDir::toNativeSeparators(QFileInfo(installerBinaryPath()).absoluteFilePath());
if (!m_performedOperationsOld.isEmpty()) {
- const Operation* const op = m_performedOperationsOld.first();
+ const Operation *const op = m_performedOperationsOld.first();
if (op->name() == QLatin1String("Mkdir")) // the target directory name
arguments << QDir::toNativeSeparators(QFileInfo(op->arguments().first()).absoluteFilePath());
}
diff --git a/installerbuilder/libinstaller/packagemanagercore_p.h b/installerbuilder/libinstaller/packagemanagercore_p.h
index 038da3b2b..a6575e794 100644
--- a/installerbuilder/libinstaller/packagemanagercore_p.h
+++ b/installerbuilder/libinstaller/packagemanagercore_p.h
@@ -126,17 +126,16 @@ public:
void stopProcessesForUpdates(const QList<Component*> &components);
int countProgressOperations(const QList<Component*> &components);
int countProgressOperations(const OperationList &operations);
- void connectOperationToInstaller(Operation* const operation, double progressOperationPartSize);
+ void connectOperationToInstaller(Operation *const operation, double progressOperationPartSize);
- Operation* createOwnedOperation(const QString &type);
- Operation* takeOwnedOperation(Operation *operation);
+ Operation *createOwnedOperation(const QString &type);
+ Operation *takeOwnedOperation(Operation *operation);
- Operation* createPathOperation(const QFileInfo &fileInfo,
- const QString &componentName);
+ Operation *createPathOperation(const QFileInfo &fileInfo, const QString &componentName);
void registerPathesForUninstallation(const QList<QPair<QString, bool> > &pathesForUninstallation,
const QString &componentName);
- void addPerformed(Operation* op) {
+ void addPerformed(Operation *op) {
m_performedOperationsCurrentSession.append(op);
}
diff --git a/installerbuilder/libinstaller/packagemanagergui.cpp b/installerbuilder/libinstaller/packagemanagergui.cpp
index 10dc396ae..d1904bfb3 100644
--- a/installerbuilder/libinstaller/packagemanagergui.cpp
+++ b/installerbuilder/libinstaller/packagemanagergui.cpp
@@ -121,7 +121,7 @@ TRANSLATOR QInstaller::FinishedPage
class DynamicInstallerPage : public PackageManagerPage
{
public:
- explicit DynamicInstallerPage(QWidget* widget, PackageManagerCore *core = 0)
+ explicit DynamicInstallerPage(QWidget *widget, PackageManagerCore *core = 0)
: PackageManagerPage(core)
, m_widget(widget)
{
@@ -138,7 +138,7 @@ public:
layout()->addWidget(widget);
}
- QWidget* widget() const
+ QWidget *widget() const
{
return m_widget;
}
@@ -149,7 +149,7 @@ public:
}
protected:
- bool eventFilter(QObject* obj, QEvent* event)
+ bool eventFilter(QObject *obj, QEvent *event)
{
if (obj == m_widget) {
switch(event->type()) {
@@ -197,7 +197,7 @@ public:
// -- PackageManagerGui
-QScriptEngine* PackageManagerGui::controlScriptEngine() const
+QScriptEngine *PackageManagerGui::controlScriptEngine() const
{
return &d->m_controlScriptEngine;
}
@@ -285,7 +285,7 @@ QString PackageManagerGui::defaultButtonText(int wizardButton) const
void PackageManagerGui::clickButton(int wb, int delay)
{
- if (QAbstractButton* b = button(static_cast<QWizard::WizardButton>(wb) )) {
+ if (QAbstractButton *b = button(static_cast<QWizard::WizardButton>(wb) )) {
QTimer::singleShot(delay, b, SLOT(click()));
} else {
// TODO: we should probably abort immediately here (faulty test script)
@@ -297,7 +297,7 @@ void PackageManagerGui::clickButton(int wb, int delay)
Loads a script to perform the installation non-interactively.
@throws QInstaller::Error if the script is not readable/cannot be parsed
*/
-void PackageManagerGui::loadControlScript(const QString& scriptPath)
+void PackageManagerGui::loadControlScript(const QString &scriptPath)
{
QFile file(scriptPath);
if (!file.open(QIODevice::ReadOnly)) {
@@ -361,7 +361,7 @@ void PackageManagerGui::slotCurrentPageChanged(int id)
Q_ARG(int, id));
}
-void PackageManagerGui::callControlScriptMethod(const QString& methodName)
+void PackageManagerGui::callControlScriptMethod(const QString &methodName)
{
QScriptValue method = d->m_controlScript.property(QLatin1String("prototype")).property(methodName);
@@ -395,7 +395,7 @@ void PackageManagerGui::onLanguageChanged()
d->m_defaultButtonText.insert(i, buttonText(QWizard::WizardButton(i)));
}
-bool PackageManagerGui::event(QEvent* event)
+bool PackageManagerGui::event(QEvent *event)
{
switch(event->type()) {
case QEvent::LanguageChange:
@@ -424,7 +424,7 @@ void PackageManagerGui::showEvent(QShowEvent *event)
QWizard::showEvent(event);
}
-void PackageManagerGui::wizardPageInsertionRequested(QWidget* widget,
+void PackageManagerGui::wizardPageInsertionRequested(QWidget *widget,
QInstaller::PackageManagerCore::WizardPage page)
{
// just in case it was already in there...
@@ -438,12 +438,12 @@ void PackageManagerGui::wizardPageInsertionRequested(QWidget* widget,
setPage(p, new DynamicInstallerPage(widget, m_core));
}
-void PackageManagerGui::wizardPageRemovalRequested(QWidget* widget)
+void PackageManagerGui::wizardPageRemovalRequested(QWidget *widget)
{
const QList<int> pages = pageIds();
for (QList<int>::const_iterator it = pages.begin(); it != pages.end(); ++it) {
- QWizardPage* const p = page(*it);
- DynamicInstallerPage* const dynamicPage = dynamic_cast<DynamicInstallerPage*>(p);
+ QWizardPage *const p = page(*it);
+ DynamicInstallerPage *const dynamicPage = dynamic_cast<DynamicInstallerPage*>(p);
if (dynamicPage == 0)
continue;
if (dynamicPage->widget() != widget)
@@ -452,15 +452,15 @@ void PackageManagerGui::wizardPageRemovalRequested(QWidget* widget)
}
}
-void PackageManagerGui::wizardWidgetInsertionRequested(QWidget* widget,
+void PackageManagerGui::wizardWidgetInsertionRequested(QWidget *widget,
QInstaller::PackageManagerCore::WizardPage page)
{
Q_ASSERT(widget);
- if (QWizardPage* const p = QWizard::page(page))
+ if (QWizardPage *const p = QWizard::page(page))
p->layout()->addWidget(widget);
}
-void PackageManagerGui::wizardWidgetRemovalRequested(QWidget* widget)
+void PackageManagerGui::wizardWidgetRemovalRequested(QWidget *widget)
{
Q_ASSERT(widget);
widget->setParent(0);
@@ -484,7 +484,7 @@ PackageManagerPage *PackageManagerGui::page(int pageId) const
return qobject_cast<PackageManagerPage*> (QWizard::page(pageId));
}
-QWidget* PackageManagerGui::pageWidgetByObjectName(const QString& name) const
+QWidget *PackageManagerGui::pageWidgetByObjectName(const QString &name) const
{
const QList<int> ids = pageIds();
foreach (const int i, ids) {
@@ -492,7 +492,7 @@ QWidget* PackageManagerGui::pageWidgetByObjectName(const QString& name) const
if (p && p->objectName() == name) {
// For dynamic pages, return the contained widget (as read from the UI file), not the
// wrapper page
- if (DynamicInstallerPage* dp = dynamic_cast<DynamicInstallerPage*>(p))
+ if (DynamicInstallerPage *dp = dynamic_cast<DynamicInstallerPage*>(p))
return dp->widget();
return p;
}
@@ -501,7 +501,7 @@ QWidget* PackageManagerGui::pageWidgetByObjectName(const QString& name) const
return 0;
}
-QWidget* PackageManagerGui::currentPageWidget() const
+QWidget *PackageManagerGui::currentPageWidget() const
{
return currentPage();
}
@@ -741,7 +741,7 @@ class LicenseAgreementPage::ClickForwarder : public QObject
Q_OBJECT
public:
- explicit ClickForwarder(QAbstractButton* button)
+ explicit ClickForwarder(QAbstractButton *button)
: QObject(button)
, m_abstractButton(button) {}
@@ -756,7 +756,7 @@ protected:
return QObject::eventFilter(object, event);
}
private:
- QAbstractButton* m_abstractButton;
+ QAbstractButton *m_abstractButton;
};
@@ -797,7 +797,7 @@ LicenseAgreementPage::LicenseAgreementPage(PackageManagerCore *core)
m_acceptRadioButton = new QRadioButton(this);
m_acceptRadioButton->setShortcut(QKeySequence(tr("Alt+A", "agree license")));
m_acceptRadioButton->setObjectName(QLatin1String("AcceptLicenseRadioButton"));
- ClickForwarder* acceptClickForwarder = new ClickForwarder(m_acceptRadioButton);
+ ClickForwarder *acceptClickForwarder = new ClickForwarder(m_acceptRadioButton);
QLabel *acceptLabel = new QLabel;
acceptLabel->setWordWrap(true);
@@ -811,7 +811,7 @@ LicenseAgreementPage::LicenseAgreementPage(PackageManagerCore *core)
"contained in these license agreements.")).toString()));
m_rejectRadioButton = new QRadioButton(this);
- ClickForwarder* rejectClickForwarder = new ClickForwarder(m_rejectRadioButton);
+ ClickForwarder *rejectClickForwarder = new ClickForwarder(m_rejectRadioButton);
m_rejectRadioButton->setObjectName(QString::fromUtf8("RejectLicenseRadioButton"));
m_rejectRadioButton->setShortcut(QKeySequence(tr("Alt+D", "do not agree license")));
@@ -854,7 +854,7 @@ void LicenseAgreementPage::entering()
QList<QInstaller::Component*> components = packageManagerCore()->orderedComponentsToInstall();
- foreach (QInstaller::Component* component, components) {
+ foreach (QInstaller::Component *component, components) {
addLicenseItem(component->licenses());
}
@@ -1141,7 +1141,7 @@ void ComponentSelectionPage::selectDefault()
/*!
Selects the component with /a id in the component tree.
*/
-void ComponentSelectionPage::selectComponent(const QString& id)
+void ComponentSelectionPage::selectComponent(const QString &id)
{
const QModelIndex &idx = d->m_currentModel->indexFromComponentName(id);
if (idx.isValid())
@@ -1151,7 +1151,7 @@ void ComponentSelectionPage::selectComponent(const QString& id)
/*!
Deselects the component with /a id in the component tree.
*/
-void ComponentSelectionPage::deselectComponent(const QString& id)
+void ComponentSelectionPage::deselectComponent(const QString &id)
{
const QModelIndex &idx = d->m_currentModel->indexFromComponentName(id);
if (idx.isValid())
@@ -1379,7 +1379,7 @@ void StartMenuDirectoryPage::leaving()
packageManagerCore()->setValue(scStartMenuDir, startMenuPath + QDir::separator() + startMenuDir());
}
-void StartMenuDirectoryPage::currentItemChanged(QListWidgetItem* current)
+void StartMenuDirectoryPage::currentItemChanged(QListWidgetItem *current)
{
if (current) {
QString dir = current->data(Qt::DisplayRole).toString();
@@ -1682,7 +1682,7 @@ void PerformInstallationPage::leaving()
// -- public slots
-void PerformInstallationPage::setTitleMessage(const QString& title)
+void PerformInstallationPage::setTitleMessage(const QString &title)
{
setTitle(tr("%1").arg(title));
}