diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-03-11 18:41:53 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-03-11 18:41:53 +0000 |
| commit | 3c736d6ce775eb3d16325bbdfc1f752af6f2c35c (patch) | |
| tree | 4051eddb2a386baf28bb3a1c2233e65e3deca59a /src/plugins/Ui/skinned | |
| parent | fde412804110ff61f32467967a927579b2d4798e (diff) | |
| download | qmmp-3c736d6ce775eb3d16325bbdfc1f752af6f2c35c.tar.gz qmmp-3c736d6ce775eb3d16325bbdfc1f752af6f2c35c.tar.bz2 qmmp-3c736d6ce775eb3d16325bbdfc1f752af6f2c35c.zip | |
optimization
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9278 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/skinned')
| -rw-r--r-- | src/plugins/Ui/skinned/skinreader.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/Ui/skinned/skinreader.cpp b/src/plugins/Ui/skinned/skinreader.cpp index cbfa099f9..b3b63d898 100644 --- a/src/plugins/Ui/skinned/skinreader.cpp +++ b/src/plugins/Ui/skinned/skinreader.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2015 by Ilya Kotov * + * Copyright (C) 2008-2020 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -149,9 +149,7 @@ const QPixmap SkinReader::getPreview(const QString &skinPath) void SkinReader::untar(const QString &from, const QString &to, bool preview) { QByteArray array; - QStringList args; - //list archive - args << "tf" <<from; + QStringList args = { "tf", from }; //list archive m_process->start("tar", args); m_process->waitForFinished(); array = m_process->readAllStandardOutput (); @@ -186,10 +184,9 @@ void SkinReader::untar(const QString &from, const QString &to, bool preview) void SkinReader::unzip(const QString &from, const QString &to, bool preview) { - QStringList args; if (preview) { - args << "-C" << "-j" << "-o" << "-qq" << "-d" << to << from << "main.*" << "*/main.*"; + QStringList args = { "-C", "-j", "-o", "-qq", "-d", to, from, "main.*", "*/main.*" }; QProcess::execute("unzip", args); QDir dir(to); dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks); @@ -205,7 +202,7 @@ void SkinReader::unzip(const QString &from, const QString &to, bool preview) } else { - args << "-j" << "-o" << "-qq" << "-d" << to << from; + QStringList args = { "-j", "-o", "-qq", "-d", to, from }; QProcess::execute("unzip", args); } } |
