Commit 85ed66ba authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Android: Pass some values by reference



Change-Id: Ic12452320728b161afd2907deb036d0c6d9df644
Reviewed-by: default avatarBogDan Vatra <bogdan@kde.org>
parent 772c2caa
......@@ -646,7 +646,8 @@ bool AndroidManifestEditorWidget::syncToWidgets()
return false;
}
bool AndroidManifestEditorWidget::checkDocument(QDomDocument doc, QString *errorMessage, int *errorLine, int *errorColumn)
bool AndroidManifestEditorWidget::checkDocument(const QDomDocument &doc, QString *errorMessage,
int *errorLine, int *errorColumn)
{
QDomElement manifest = doc.documentElement();
if (manifest.tagName() != QLatin1String("manifest")) {
......@@ -894,7 +895,7 @@ void AndroidManifestEditorWidget::syncToEditor()
namespace {
QXmlStreamAttributes modifyXmlStreamAttributes(const QXmlStreamAttributes &input, const QStringList &keys,
const QStringList values, const QStringList &remove = QStringList())
const QStringList &values, const QStringList &remove = QStringList())
{
Q_ASSERT(keys.size() == values.size());
QXmlStreamAttributes result;
......@@ -1158,7 +1159,9 @@ void AndroidManifestEditorWidget::parseUsesSdk(QXmlStreamReader &reader, QXmlStr
}
}
QString AndroidManifestEditorWidget::parseUsesPermission(QXmlStreamReader &reader, QXmlStreamWriter &writer, const QSet<QString> permissions)
QString AndroidManifestEditorWidget::parseUsesPermission(QXmlStreamReader &reader,
QXmlStreamWriter &writer,
const QSet<QString> &permissions)
{
Q_ASSERT(reader.isStartElement());
......@@ -1374,7 +1377,7 @@ QModelIndex PermissionsModel::addPermission(const QString &permission)
return index(idx);
}
bool PermissionsModel::updatePermission(QModelIndex index, const QString &permission)
bool PermissionsModel::updatePermission(const QModelIndex &index, const QString &permission)
{
if (!index.isValid())
return false;
......
......@@ -69,7 +69,7 @@ public:
void setPermissions(const QStringList &permissions);
const QStringList &permissions();
QModelIndex addPermission(const QString &permission);
bool updatePermission(QModelIndex index, const QString &permission);
bool updatePermission(const QModelIndex &index, const QString &permission);
void removePermission(int index);
QVariant data(const QModelIndex &index, int role) const;
......@@ -137,7 +137,8 @@ private:
void syncToWidgets(const QDomDocument &doc);
void syncToEditor();
bool checkDocument(QDomDocument doc, QString *errorMessage, int *errorLine, int *errorColumn);
bool checkDocument(const QDomDocument &doc, QString *errorMessage,
int *errorLine, int *errorColumn);
enum IconDPI { LowDPI, MediumDPI, HighDPI };
QIcon icon(const QString &baseDir, IconDPI dpi);
QString iconPath(const QString &baseDir, IconDPI dpi);
......@@ -152,7 +153,9 @@ private:
void parseActivity(QXmlStreamReader &reader, QXmlStreamWriter &writer);
bool parseMetaData(QXmlStreamReader &reader, QXmlStreamWriter &writer);
void parseUsesSdk(QXmlStreamReader &reader, QXmlStreamWriter &writer);
QString parseUsesPermission(QXmlStreamReader &reader, QXmlStreamWriter &writer, const QSet<QString> permissions);
QString parseUsesPermission(QXmlStreamReader &reader,
QXmlStreamWriter &writer,
const QSet<QString> &permissions);
QString parseComment(QXmlStreamReader &reader, QXmlStreamWriter &writer);
void parseUnknownElement(QXmlStreamReader &reader, QXmlStreamWriter &writer);
......
......@@ -603,7 +603,7 @@ void AndroidSettingsWidget::startAVD()
m_androidConfig.startAVDAsync(m_AVDModel.avdName(m_ui->AVDTableView->currentIndex()));
}
void AndroidSettingsWidget::avdActivated(QModelIndex index)
void AndroidSettingsWidget::avdActivated(const QModelIndex &index)
{
m_ui->AVDRemovePushButton->setEnabled(index.isValid());
m_ui->AVDStartPushButton->setEnabled(index.isValid());
......
......@@ -88,7 +88,7 @@ private slots:
void avdAdded();
void removeAVD();
void startAVD();
void avdActivated(QModelIndex);
void avdActivated(const QModelIndex &);
void dataPartitionSizeEditingFinished();
void manageAVD();
void createKitToggled();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment