From 445747155f498be2d1db8c9900cd98ccd28e7b10 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 26 Apr 2014 13:21:39 +0200 Subject: [PATCH] [GreaseMonkey] Fixed downloading scripts to correct directory --- src/plugins/GreaseMonkey/gm_downloader.cpp | 2 +- src/plugins/GreaseMonkey/gm_plugin.cpp | 2 +- src/plugins/GreaseMonkey/greasemonkey.qrc | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/GreaseMonkey/gm_downloader.cpp b/src/plugins/GreaseMonkey/gm_downloader.cpp index a7a284bb0..2543aaecd 100644 --- a/src/plugins/GreaseMonkey/gm_downloader.cpp +++ b/src/plugins/GreaseMonkey/gm_downloader.cpp @@ -60,7 +60,7 @@ void GM_Downloader::scriptDownloaded() const QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8(); if (response.contains(QByteArray("// ==UserScript=="))) { - const QString filePath = m_manager->scriptsDirectory() + QzTools::getFileNameFromUrl(m_reply->url()); + const QString filePath = QString("%1/%2").arg(m_manager->scriptsDirectory(),QzTools::getFileNameFromUrl(m_reply->url())); m_fileName = QzTools::ensureUniqueFilename(filePath); QFile file(m_fileName); diff --git a/src/plugins/GreaseMonkey/gm_plugin.cpp b/src/plugins/GreaseMonkey/gm_plugin.cpp index c9ef04503..c03341478 100644 --- a/src/plugins/GreaseMonkey/gm_plugin.cpp +++ b/src/plugins/GreaseMonkey/gm_plugin.cpp @@ -41,7 +41,7 @@ PluginSpec GM_Plugin::pluginSpec() spec.name = "GreaseMonkey"; spec.info = "Userscripts for QupZilla"; spec.description = "Provides support for userscripts (www.userscripts.org)"; - spec.version = "0.4.4"; + spec.version = "0.4.5"; spec.author = "David Rosca "; spec.icon = QPixmap(":gm/data/icon.png"); spec.hasSettings = true; diff --git a/src/plugins/GreaseMonkey/greasemonkey.qrc b/src/plugins/GreaseMonkey/greasemonkey.qrc index 7aa553281..41ca1882e 100644 --- a/src/plugins/GreaseMonkey/greasemonkey.qrc +++ b/src/plugins/GreaseMonkey/greasemonkey.qrc @@ -1,7 +1,9 @@ - data/icon.png data/bootstrap.min.js + data/icon.png + data/icon16.png + data/icon18.png data/script.png locale/ar_SA.qm locale/bg_BG.qm