diff --git a/pkg/arch/PKGBUILD b/pkg/arch/PKGBUILD index 6f02dee6d8a79827476b2cb15f5e1f3680392b5d..4c13ad724b0804e7e215e4751bcaf068b2552c60 100644 --- a/pkg/arch/PKGBUILD +++ b/pkg/arch/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Akira Ohgaki <akiraohgaki@gmail.com> pkgname='xdgurl' -pkgver='2.0.1' +pkgver='2.0.2' pkgrel='1' pkgdesc='An install helper program for desktop stuff.' arch=('i686' 'x86_64') diff --git a/pkg/fedora/xdgurl.spec b/pkg/fedora/xdgurl.spec index 82ea01aaca68749c9e8d3d0c6f098ac47ff4e871..9aa3770687b6f7f6fdc85b180c48353026318fa6 100644 --- a/pkg/fedora/xdgurl.spec +++ b/pkg/fedora/xdgurl.spec @@ -1,6 +1,6 @@ Summary: An install helper program for desktop stuff Name: xdgurl -Version: 2.0.1 +Version: 2.0.2 Release: 1%{?dist} License: GPLv3+ Group: Applications/Internet @@ -37,6 +37,10 @@ make INSTALL_ROOT="%{buildroot}" install rm -rf %{buildroot} %changelog +* Thu Nov 17 2016 Akira Ohgaki <akiraohgaki@gmail.com> - 2.0.2-1 +- Update qtlibs +- Small fix + * Mon Nov 14 2016 Akira Ohgaki <akiraohgaki@gmail.com> - 2.0.1-1 - Update library - Fix download/installation process diff --git a/pkg/ubuntu/debian/changelog b/pkg/ubuntu/debian/changelog index 20f5957efff445632eb12502cf0116cbff1cd818..4c855927dc3d040069f1cf721d003dec9e8cb50c 100644 --- a/pkg/ubuntu/debian/changelog +++ b/pkg/ubuntu/debian/changelog @@ -1,3 +1,10 @@ +xdgurl (2.0.2-0ubuntu1) xenial; urgency=low + + * Update qtlibs + * Small fix + + -- Akira Ohgaki <akiraohgaki@gmail.com> Thu, 17 Nov 2016 17:30:24 +0000 + xdgurl (2.0.1-0ubuntu1) xenial; urgency=low * Update library diff --git a/src/app/configs/application.json b/src/app/configs/application.json index 1e7ccc3d00a9ebaf936faeb1d7dc4099b2883813..6beb7f2875311727de5349524654697c4ea2707b 100644 --- a/src/app/configs/application.json +++ b/src/app/configs/application.json @@ -1,7 +1,7 @@ { "id": "xdgurl", "name": "xdgurl", - "version": "2.0.1", + "version": "2.0.2", "organization": "xdgurl", "domain": "com.xdgurl.xdgurl", "icon": ":/desktop/xdgurl.svg", diff --git a/src/app/handlers/xdgurl.cpp b/src/app/handlers/xdgurl.cpp index da90bdbbb1781159ad702814a852cc20029a7c9f..0a7e442ce16fd1f3faae8868d8aa33791b83b116 100644 --- a/src/app/handlers/xdgurl.cpp +++ b/src/app/handlers/xdgurl.cpp @@ -134,11 +134,11 @@ void XdgUrl::loadDestinations() QJsonObject configDestinations = config_.get("destinations"); QJsonObject configDestinationsAlias = config_.get("destinations_alias"); - foreach (const QString key, configDestinations.keys()) { + foreach (const QString &key, configDestinations.keys()) { destinations_[key] = convertPathString(configDestinations[key].toString()); } - foreach (const QString key, configDestinationsAlias.keys()) { + foreach (const QString &key, configDestinationsAlias.keys()) { QString value = configDestinationsAlias[key].toString(); if (destinations_.contains(value)) { destinations_[key] = destinations_.value(value); diff --git a/src/libs/qtlibs/config.cpp b/src/libs/qtlibs/config.cpp index 24002244d70b7c1e7f8863009485a68c01ddf799..11e0de575c9050a752bdb5fc9266fbccfc602fc6 100644 --- a/src/libs/qtlibs/config.cpp +++ b/src/libs/qtlibs/config.cpp @@ -21,15 +21,14 @@ Config::Config(const QString &configDirPath, QObject *parent) : QObject(parent), configDirPath_(configDirPath) {} -Config::Config(const Config &other) +Config::Config(const Config &other, QObject *parent) + : QObject(parent) { - this->setParent(other.parent()); setConfigDirPath(other.configDirPath()); } Config &Config::operator =(const Config &other) { - this->setParent(other.parent()); setConfigDirPath(other.configDirPath()); return *this; } diff --git a/src/libs/qtlibs/config.h b/src/libs/qtlibs/config.h index 5f0df5fdc310e2e3688416dbd8074a2eeca2c467..190c2c7d41d6fe2fa1e1b72e0f42a9d313dc3eeb 100644 --- a/src/libs/qtlibs/config.h +++ b/src/libs/qtlibs/config.h @@ -21,9 +21,9 @@ class Config : public QObject Q_OBJECT public: - explicit Config(const QString &configDirPath = QString(), QObject *parent = 0); + explicit Config(const QString &configDirPath = "", QObject *parent = 0); - Config(const Config &other); + Config(const Config &other, QObject *parent = 0); Config &operator =(const Config &other); QString configDirPath() const; diff --git a/src/libs/qtlibs/dir.cpp b/src/libs/qtlibs/dir.cpp index e0b579a97f3c6616f9463959c2ace7e8f12729c0..c444ae6c02651e72d2ba6056417de56bec151e94 100644 --- a/src/libs/qtlibs/dir.cpp +++ b/src/libs/qtlibs/dir.cpp @@ -22,15 +22,14 @@ Dir::Dir(const QString &path, QObject *parent) : QObject(parent), path_(path) {} -Dir::Dir(const Dir &other) +Dir::Dir(const Dir &other, QObject *parent) + : QObject(parent) { - this->setParent(other.parent()); setPath(other.path()); } Dir &Dir::operator =(const Dir &other) { - this->setParent(other.parent()); setPath(other.path()); return *this; } diff --git a/src/libs/qtlibs/dir.h b/src/libs/qtlibs/dir.h index 31e63a556e58a335a4b5fe808f43751f0f453042..aa3dfe15369a49bf5bfd49e87a92ddaaa54a6554 100644 --- a/src/libs/qtlibs/dir.h +++ b/src/libs/qtlibs/dir.h @@ -21,9 +21,9 @@ class Dir : public QObject Q_OBJECT public: - explicit Dir(const QString &path = QString(), QObject *parent = 0); + explicit Dir(const QString &path = "", QObject *parent = 0); - Dir(const Dir &other); + Dir(const Dir &other, QObject *parent = 0); Dir &operator =(const Dir &other); QString path() const; diff --git a/src/libs/qtlibs/file.cpp b/src/libs/qtlibs/file.cpp index d092cfa776502579fe06ba4f6b4be3b8ccf4820e..39d9542826fb3f92a6ed853e23dfe3326f20f169 100644 --- a/src/libs/qtlibs/file.cpp +++ b/src/libs/qtlibs/file.cpp @@ -21,15 +21,14 @@ File::File(const QString &path, QObject *parent) : QObject(parent), path_(path) {} -File::File(const File &other) +File::File(const File &other, QObject *parent) + : QObject(parent) { - this->setParent(other.parent()); setPath(other.path()); } File &File::operator =(const File &other) { - this->setParent(other.parent()); setPath(other.path()); return *this; } diff --git a/src/libs/qtlibs/file.h b/src/libs/qtlibs/file.h index bfc1389045ffcb21db10b13381e763e6105bd18c..d9a77830189e8d51fc4595eb0ee07450e31ff2d0 100644 --- a/src/libs/qtlibs/file.h +++ b/src/libs/qtlibs/file.h @@ -20,9 +20,9 @@ class File : public QObject Q_OBJECT public: - explicit File(const QString &path = QString(), QObject *parent = 0); + explicit File(const QString &path = "", QObject *parent = 0); - File(const File &other); + File(const File &other, QObject *parent = 0); File &operator =(const File &other); QString path() const; diff --git a/src/libs/qtlibs/json.cpp b/src/libs/qtlibs/json.cpp index 1cddfe0f6df31516a78394e85af0f1a62a28dc35..09d992231a8aa3dc577b0304fd6b787493f9bfb1 100644 --- a/src/libs/qtlibs/json.cpp +++ b/src/libs/qtlibs/json.cpp @@ -32,15 +32,14 @@ Json::Json(const QJsonArray &array, QObject *parent) fromArray(array); } -Json::Json(const Json &other) +Json::Json(const Json &other, QObject *parent) + : QObject(parent) { - this->setParent(other.parent()); setJson(other.json()); } Json &Json::operator =(const Json &other) { - this->setParent(other.parent()); setJson(other.json()); return *this; } diff --git a/src/libs/qtlibs/json.h b/src/libs/qtlibs/json.h index 9d6cd4e165bee8067b7da2d43801e1e09443a8e0..1c60a145c6c75f831670f0e274d1e97b6e33d6c0 100644 --- a/src/libs/qtlibs/json.h +++ b/src/libs/qtlibs/json.h @@ -26,7 +26,7 @@ public: explicit Json(const QJsonObject &object, QObject *parent = 0); explicit Json(const QJsonArray &array, QObject *parent = 0); - Json(const Json &other); + Json(const Json &other, QObject *parent = 0); Json &operator =(const Json &other); QByteArray json() const; diff --git a/src/libs/qtlibs/networkresource.cpp b/src/libs/qtlibs/networkresource.cpp index 16238f0f4bdac1686ed462e2d9ff88bd5c52e4d1..ddf879c4fbf3ac5bc4a532d54e60f46bd6c7c355 100644 --- a/src/libs/qtlibs/networkresource.cpp +++ b/src/libs/qtlibs/networkresource.cpp @@ -17,7 +17,7 @@ namespace qtlibs { -NetworkResource::NetworkResource(const QString &name, const QUrl &url, const bool &async, QObject *parent) +NetworkResource::NetworkResource(const QString &name, const QUrl &url, bool async, QObject *parent) : QObject(parent), name_(name), url_(url), async_(async) { setManager(new QNetworkAccessManager(this)); @@ -28,30 +28,22 @@ NetworkResource::~NetworkResource() manager()->deleteLater(); } -NetworkResource::NetworkResource(const NetworkResource &other) +NetworkResource::NetworkResource(const NetworkResource &other, QObject *parent) + : QObject(parent) { - this->setParent(other.parent()); setName(other.name()); setUrl(other.url()); setAsync(other.async()); setRequest(other.request()); - setManager(other.manager()); - setReply(other.reply()); - setMethod(other.method()); + setManager(new QNetworkAccessManager(this)); } NetworkResource &NetworkResource::operator =(const NetworkResource &other) { - manager()->deleteLater(); - - this->setParent(other.parent()); setName(other.name()); setUrl(other.url()); setAsync(other.async()); setRequest(other.request()); - setManager(other.manager()); - setReply(other.reply()); - setMethod(other.method()); return *this; } @@ -80,7 +72,7 @@ bool NetworkResource::async() const return async_; } -void NetworkResource::setAsync(const bool &async) +void NetworkResource::setAsync(bool async) { async_ = async; } @@ -190,7 +182,7 @@ void NetworkResource::setMethod(const QString &method) method_ = method; } -NetworkResource *NetworkResource::send(const bool &async, const QNetworkRequest &request) +NetworkResource *NetworkResource::send(bool async, const QNetworkRequest &request) { if (method() == "HEAD") { setReply(manager()->head(request)); diff --git a/src/libs/qtlibs/networkresource.h b/src/libs/qtlibs/networkresource.h index 4186ee64de4f3c38c76f7cfaa3dae5348737e1c9..1a4c73bc58ccb8caf4c197bcdced28570c0b4bc1 100644 --- a/src/libs/qtlibs/networkresource.h +++ b/src/libs/qtlibs/networkresource.h @@ -24,10 +24,10 @@ class NetworkResource : public QObject Q_OBJECT public: - explicit NetworkResource(const QString &name = QString(), const QUrl &url = QUrl(), const bool &async = true, QObject *parent = 0); + explicit NetworkResource(const QString &name = "", const QUrl &url = QUrl(), bool async = true, QObject *parent = 0); ~NetworkResource(); - NetworkResource(const NetworkResource &other); + NetworkResource(const NetworkResource &other, QObject *parent = 0); NetworkResource &operator =(const NetworkResource &other); QString name() const; @@ -35,7 +35,7 @@ public: QUrl url() const; void setUrl(const QUrl &url); bool async() const; - void setAsync(const bool &async); + void setAsync(bool async); QNetworkRequest request() const; void setRequest(const QNetworkRequest &request); QNetworkAccessManager *manager() const; @@ -62,7 +62,7 @@ private: void setReply(QNetworkReply *reply); void setMethod(const QString &method); - NetworkResource *send(const bool &async, const QNetworkRequest &request); + NetworkResource *send(bool async, const QNetworkRequest &request); QString name_; QUrl url_; diff --git a/src/libs/qtlibs/package.cpp b/src/libs/qtlibs/package.cpp index d857f14d3757da60393880615e8fa4d7da6d86ad..9db1ae9ab9c872e4733834780e5e9b656b5edd92 100644 --- a/src/libs/qtlibs/package.cpp +++ b/src/libs/qtlibs/package.cpp @@ -27,15 +27,14 @@ Package::Package(const QString &path, QObject *parent) : QObject(parent), path_(path) {} -Package::Package(const Package &other) +Package::Package(const Package &other, QObject *parent) + : QObject(parent) { - this->setParent(other.parent()); setPath(other.path()); } Package &Package::operator =(const Package &other) { - this->setParent(other.parent()); setPath(other.path()); return *this; } diff --git a/src/libs/qtlibs/package.h b/src/libs/qtlibs/package.h index b11e77569696cbba1bc0027a19818d2c78ca5ed6..077a8cdddbba17acd4e4f40bc83526bcc4ab7969 100644 --- a/src/libs/qtlibs/package.h +++ b/src/libs/qtlibs/package.h @@ -20,9 +20,9 @@ class Package : public QObject Q_OBJECT public: - explicit Package(const QString &path = QString(), QObject *parent = 0); + explicit Package(const QString &path = "", QObject *parent = 0); - Package(const Package &other); + Package(const Package &other, QObject *parent = 0); Package &operator =(const Package &other); QString path() const; diff --git a/xdgurl.pro b/xdgurl.pro index ac9e820402e1711abf2d80dfa1fdfa66e1f0b0c3..ef0d7d99b58cff15dad44833239417660a004dcd 100644 --- a/xdgurl.pro +++ b/xdgurl.pro @@ -24,8 +24,8 @@ DISTFILES += \ pkg/fedora/xdgurl.spec \ pkg/arch/PKGBUILD -include(src/app/app.pri) - include(src/libs/qtlibs/qtlibs.pri) +include(src/app/app.pri) + include(deployment.pri)