diff --git a/konaimage.cpp b/konaimage.cpp index f1c42da..463c6c8 100755 --- a/konaimage.cpp +++ b/konaimage.cpp @@ -51,7 +51,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in previewFile->setFileName(KONAIMAGE_PREVIEWPATH); // Prepare preview HTTP - previewHttp = new QHttp("konachan.com"); //TODO: all these konachans.com should be Kc->getServer() + previewHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps); //TODO: all these konachans.com should be Kc->getServer() connect(previewHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(previewResponseHeaderReceived(QHttpResponseHeader))); connect(previewHttp, SIGNAL(requestFinished(int,bool)), @@ -63,7 +63,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in imageFile->setFileName(KONAIMAGE_LOCALPATH); // Prepare image HTTP - imageHttp = new QHttp("konachan.com"); + imageHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps); connect(imageHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(imageResponseHeaderReceived(QHttpResponseHeader))); connect(imageHttp, SIGNAL(requestFinished(int,bool)), @@ -75,7 +75,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in jpegFile->setFileName(KONAIMAGE_JPEGPATH); // Prepare jpeg HTTP - jpegHttp = new QHttp("konachan.com"); + jpegHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps); connect(jpegHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(jpegResponseHeaderReceived(QHttpResponseHeader))); connect(jpegHttp, SIGNAL(requestFinished(int,bool)), @@ -87,7 +87,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in sampleFile->setFileName(KONAIMAGE_SAMPLEPATH); // Prepare sample HTTP - sampleHttp = new QHttp("konachan.com"); + sampleHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps); connect(sampleHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(sampleResponseHeaderReceived(QHttpResponseHeader))); connect(sampleHttp, SIGNAL(requestFinished(int,bool)), diff --git a/konarelatedtags.cpp b/konarelatedtags.cpp index 32d3767..c49984f 100755 --- a/konarelatedtags.cpp +++ b/konarelatedtags.cpp @@ -18,7 +18,7 @@ KonaRelatedTags::KonaRelatedTags(KonaClient *Kc, QString Tags, QString Type) } // Prepare HTTP - http = new QHttp(kc->getServer()); + http = new QHttp(kc->getServer(), QHttp::ConnectionModeHttps); connect(http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(responseHeaderReceived(QHttpResponseHeader))); connect(http, SIGNAL(requestFinished(int,bool)), diff --git a/konasearch.cpp b/konasearch.cpp index 97b6b20..9ad12dd 100755 --- a/konasearch.cpp +++ b/konasearch.cpp @@ -31,7 +31,7 @@ KonaSearch::KonaSearch(KonaClient *Kc, QString Tags, int Page, int Limit) } // Prepare HTTP - http = new QHttp(kc->getServer()); + http = new QHttp(kc->getServer(), QHttp::ConnectionModeHttps); connect(http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(responseHeaderReceived(QHttpResponseHeader))); connect(http, SIGNAL(requestFinished(int,bool)), @@ -94,7 +94,7 @@ void KonaSearch::searchAgain() return; } - QUrl url("/post/index.xml?limit=" + QString::number(limit) + "&page=" + QString::number(page) + "&tags=" + tags); + QUrl url("/post.xml?limit=" + QString::number(limit) + "&page=" + QString::number(page) + "&tags=" + tags); http->get(url.toString(), file); } diff --git a/mainwindow.cpp b/mainwindow.cpp index a440895..f39b284 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -21,7 +21,7 @@ MainWindow::MainWindow(QWidget *parent) : bottomPage = 1; insertAtBeginning = false; - kc = new KonaClient(QDir::tempPath() + "/KonaClient", "/home/markus/Bilder/KonaChan/Cache", "/home/markus/Bilder/KonaChan/Archive"); + kc = new KonaClient(QDir::tempPath() + "/KonaClient", QDir::homePath() + "/Pictures/KonaChan/Cache", QDir::homePath() + "/Pictures/KonaChan/Archive"); flowLayout = new FlowLayout;