Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DFN2
ocs-url
Commits
cc784f74
Commit
cc784f74
authored
Nov 18, 2016
by
akiraohgaki
Committed by
GitHub
Nov 18, 2016
Browse files
Merge pull request #29 from xdgurl/development
2.0.2
parents
e3f616d1
b52e022e
Changes
18
Hide whitespace changes
Inline
Side-by-side
pkg/arch/PKGBUILD
View file @
cc784f74
# 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'
)
...
...
pkg/fedora/xdgurl.spec
View file @
cc784f74
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
...
...
pkg/ubuntu/debian/changelog
View file @
cc784f74
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
...
...
src/app/configs/application.json
View file @
cc784f74
{
"id"
:
"xdgurl"
,
"name"
:
"xdgurl"
,
"version"
:
"2.0.
1
"
,
"version"
:
"2.0.
2
"
,
"organization"
:
"xdgurl"
,
"domain"
:
"com.xdgurl.xdgurl"
,
"icon"
:
":/desktop/xdgurl.svg"
,
...
...
src/app/handlers/xdgurl.cpp
View file @
cc784f74
...
...
@@ -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
);
...
...
src/libs/qtlibs/config.cpp
View file @
cc784f74
...
...
@@ -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
;
}
...
...
src/libs/qtlibs/config.h
View file @
cc784f74
...
...
@@ -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
;
...
...
src/libs/qtlibs/dir.cpp
View file @
cc784f74
...
...
@@ -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
;
}
...
...
src/libs/qtlibs/dir.h
View file @
cc784f74
...
...
@@ -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
;
...
...
src/libs/qtlibs/file.cpp
View file @
cc784f74
...
...
@@ -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
;
}
...
...
src/libs/qtlibs/file.h
View file @
cc784f74
...
...
@@ -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
;
...
...
src/libs/qtlibs/json.cpp
View file @
cc784f74
...
...
@@ -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
;
}
...
...
src/libs/qtlibs/json.h
View file @
cc784f74
...
...
@@ -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
;
...
...
src/libs/qtlibs/networkresource.cpp
View file @
cc784f74
...
...
@@ -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
));
...
...
src/libs/qtlibs/networkresource.h
View file @
cc784f74
...
...
@@ -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_
;
...
...
src/libs/qtlibs/package.cpp
View file @
cc784f74
...
...
@@ -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
;
}
...
...
src/libs/qtlibs/package.h
View file @
cc784f74
...
...
@@ -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
;
...
...
xdgurl.pro
View file @
cc784f74
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment