Skip to content
Snippets Groups Projects
Commit e7332f28 authored by akiraohgaki's avatar akiraohgaki
Browse files

Change file structure

parent daca84cc
No related branches found
No related tags found
No related merge requests found
Showing
with 11 additions and 10 deletions
File moved
File moved
File moved
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
#include <QNetworkReply> #include <QNetworkReply>
#include <QDesktopServices> #include <QDesktopServices>
#include "../utils/config.h" #include "../../libs/utils/config.h"
#include "../utils/network.h" #include "../../libs/utils/network.h"
#include "../utils/file.h" #include "../../libs/utils/file.h"
#include "../utils/package.h" #include "../../libs/utils/package.h"
namespace handlers { namespace handlers {
...@@ -19,8 +19,8 @@ XdgUrl::XdgUrl(const QString &xdgUrl, utils::Config *config, utils::Network *net ...@@ -19,8 +19,8 @@ XdgUrl::XdgUrl(const QString &xdgUrl, utils::Config *config, utils::Network *net
parse(); parse();
loadDestinations(); loadDestinations();
connect(network_, &utils::Network::finished, this, &XdgUrl::downloaded); connect(network_, &utils::Network::finished, this, &handlers::XdgUrl::downloaded);
connect(network_, &utils::Network::downloadProgress, this, &XdgUrl::downloadProgress); connect(network_, &utils::Network::downloadProgress, this, &handlers::XdgUrl::downloadProgress);
} }
void XdgUrl::process() void XdgUrl::process()
......
File moved
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QQmlContext> #include <QQmlContext>
#include "utils/config.h" #include "../libs/utils/config.h"
#include "utils/network.h" #include "../libs/utils/network.h"
#include "handlers/xdgurl.h" #include "handlers/xdgurl.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
...@@ -11,7 +11,7 @@ Network::Network(const bool &async, QObject *parent) : ...@@ -11,7 +11,7 @@ Network::Network(const bool &async, QObject *parent) :
QObject(parent), async_(async) QObject(parent), async_(async)
{ {
manager_ = new QNetworkAccessManager(this); manager_ = new QNetworkAccessManager(this);
connect(manager_, &QNetworkAccessManager::finished, this, &Network::finished); connect(manager_, &QNetworkAccessManager::finished, this, &utils::Network::finished);
if (!async_) { if (!async_) {
eventLoop_ = new QEventLoop(); eventLoop_ = new QEventLoop();
connect(manager_, &QNetworkAccessManager::finished, eventLoop_, &QEventLoop::quit); connect(manager_, &QNetworkAccessManager::finished, eventLoop_, &QEventLoop::quit);
...@@ -38,7 +38,7 @@ QNetworkReply *Network::head(const QUrl &uri) ...@@ -38,7 +38,7 @@ QNetworkReply *Network::head(const QUrl &uri)
QNetworkReply *Network::get(const QUrl &uri) QNetworkReply *Network::get(const QUrl &uri)
{ {
QNetworkReply *reply = manager_->get(QNetworkRequest(uri)); QNetworkReply *reply = manager_->get(QNetworkRequest(uri));
connect(reply, &QNetworkReply::downloadProgress, this, &Network::downloadProgress); connect(reply, &QNetworkReply::downloadProgress, this, &utils::Network::downloadProgress);
if (!async_) { if (!async_) {
eventLoop_->exec(); eventLoop_->exec();
} }
......
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment