diff --git a/CHANGELOG b/CHANGELOG index 498f27b53..358889c74 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,21 @@ +Version 3.0.1 + * released 8 May 2018 + * added profile migration from QupZilla + * fix incorrectly completing form data on some sites (BUG 391327) + * fix showing incorrect state of back and forward buttons (BUG 391331) + * fix loading urls containing %20 from location bar (BUG 392445) + * fix save page action for downloading text files (BUG 391300) + * fix download manager trying to closing not restored tabs (BUG 392565) + * fix updating location bar site icon after using paste and go action (BUG 392747) + * fix various issues with QtWebEngine 5.11 (BUG 392885, 393398) + * fix speed dial sometimes loading with no pages (BUG 391875) + * fix leaving html fullscreen after closing tab (BUG 393797) + * fix saving speed dial settings when there are no configured pages + * fix restoring nested crashed sessions + * fix setting minimum height of bookmarks toolbar + * VerticalTabs: fix preserving expanded state of times inside collapsed parent (BUG 393567) + * VerticalTabs: don't force open sidebar when opening new window (BUG 393629) + Version 3.0.0 * released 27 February 2018 * first Falkon release diff --git a/CMakeLists.txt b/CMakeLists.txt index 2abcbc38d..da8aca466 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,8 @@ if (WIN32) add_definitions(-D_WIN32_WINNT=${ver}) endif() +set(HAVE_QTWEBENGINE_5_10 NOT Qt5WebEngineWidgets_VERSION VERSION_LESS 5.10.0) + # Mandatory: OpenSSL find_package(OpenSSL REQUIRED) diff --git a/config.h.cmake b/config.h.cmake index d35648e5b..3cc5d3484 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -9,3 +9,6 @@ /* Disable DBus support */ #cmakedefine DISABLE_DBUS + +/* QtWebEngine is at least version 5.10 */ +#cmakedefine01 HAVE_QTWEBENGINE_5_10 diff --git a/src/lib/app/profilemanager.cpp b/src/lib/app/profilemanager.cpp index 4492450cd..4c86c6162 100644 --- a/src/lib/app/profilemanager.cpp +++ b/src/lib/app/profilemanager.cpp @@ -208,12 +208,10 @@ void ProfileManager::updateProfile(const QString ¤t, const QString &profil return; } - // No change in 3.1 + // No change in 3.0 if (prof < Updater::Version("3.0.99")) { return; } - - // Nothing for now } void ProfileManager::copyDataToProfile() diff --git a/src/lib/navigation/websearchbar.cpp b/src/lib/navigation/websearchbar.cpp index 8fab996a2..518748037 100644 --- a/src/lib/navigation/websearchbar.cpp +++ b/src/lib/navigation/websearchbar.cpp @@ -65,6 +65,7 @@ WebSearchBar::WebSearchBar(BrowserWindow* window) m_boxSearchType = new ButtonWithMenu(this); m_boxSearchType->setObjectName("websearchbar-searchprovider-combobox"); + m_boxSearchType->setFocusProxy(this); // RTL Support // If we don't add 'm_boxSearchType' by following code, then we should use suitable padding-left value // but then, when typing RTL text the layout dynamically changed and within RTL layout direction diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index b6dff0c56..87d40acd1 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -449,6 +449,8 @@ Preferences::Preferences(BrowserWindow* window) QListWidgetItem *item = new QListWidgetItem; item->setText(langName); item->setData(Qt::UserRole, lang); + item->setFlags(item->flags() & ~Qt::ItemIsSelectable); + item->setCheckState(Qt::Unchecked); ui->spellcheckLanguages->addItem(item); } } @@ -462,7 +464,7 @@ Preferences::Preferences(BrowserWindow* window) QListWidgetItem *item = items.at(0); ui->spellcheckLanguages->takeItem(ui->spellcheckLanguages->row(item)); ui->spellcheckLanguages->insertItem(topIndex++, item); - ui->spellcheckLanguages->setCurrentItem(item, QItemSelectionModel::Select); + item->setCheckState(Qt::Checked); } if (ui->spellcheckLanguages->count() == 0) { @@ -978,7 +980,7 @@ void Preferences::saveSettings() QStringList languages; for (int i = 0; i < ui->spellcheckLanguages->count(); ++i) { QListWidgetItem *item = ui->spellcheckLanguages->item(i); - if (item->isSelected()) { + if (item->checkState() == Qt::Checked) { languages.append(item->data(Qt::UserRole).toString()); } } diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui index 5f60cb94e..45417bf63 100644 --- a/src/lib/preferences/preferences.ui +++ b/src/lib/preferences/preferences.ui @@ -2419,9 +2419,6 @@ QAbstractItemView::InternalMove - - QAbstractItemView::MultiSelection - diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp index 5b17916ea..a570c34d2 100644 --- a/src/lib/webengine/webview.cpp +++ b/src/lib/webengine/webview.cpp @@ -495,7 +495,7 @@ void WebView::copyLinkToClipboard() void WebView::savePageAs() { -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) +#if HAVE_QTWEBENGINE_5_10 page()->runJavaScript(QSL("document.contentType"), WebPage::SafeJsWorld, [this](const QVariant &res) { const QSet webPageTypes = { QSL("text/html"), diff --git a/src/plugins/GnomeKeyringPasswords/gnomekeyringpasswordbackend.cpp b/src/plugins/GnomeKeyringPasswords/gnomekeyringpasswordbackend.cpp index 9b877f238..e027b319a 100644 --- a/src/plugins/GnomeKeyringPasswords/gnomekeyringpasswordbackend.cpp +++ b/src/plugins/GnomeKeyringPasswords/gnomekeyringpasswordbackend.cpp @@ -73,6 +73,31 @@ static GnomeKeyringAttributeList* createAttributes(const PasswordEntry &entry) return attributes; } +static void storeEntry(PasswordEntry &entry) +{ + guint32 itemId; + GnomeKeyringAttributeList* attributes = createAttributes(entry); + + QByteArray pass = entry.password.toUtf8(); + QByteArray host = entry.host.toUtf8(); + + GnomeKeyringResult result = gnome_keyring_item_create_sync(GNOME_KEYRING_DEFAULT, + GNOME_KEYRING_ITEM_GENERIC_SECRET, + host.constData(), + attributes, + pass.constData(), + TRUE, // Update if exists + &itemId); + + gnome_keyring_attribute_list_free(attributes); + + if (result != GNOME_KEYRING_RESULT_OK) { + qWarning() << "GnomeKeyringPasswordBackend::addEntry Cannot add entry to keyring!"; + } + + entry.id = itemId; +} + GnomeKeyringPasswordBackend::GnomeKeyringPasswordBackend() : PasswordBackend() , m_loaded(false) @@ -118,27 +143,7 @@ void GnomeKeyringPasswordBackend::addEntry(const PasswordEntry &entry) PasswordEntry stored = entry; stored.updated = QDateTime::currentDateTime().toTime_t(); - guint32 itemId; - GnomeKeyringAttributeList* attributes = createAttributes(stored); - - QByteArray pass = stored.password.toUtf8(); - QByteArray host = stored.host.toUtf8(); - - GnomeKeyringResult result = gnome_keyring_item_create_sync(GNOME_KEYRING_DEFAULT, - GNOME_KEYRING_ITEM_GENERIC_SECRET, - host.constData(), - attributes, - pass.constData(), - TRUE, // Update if exists - &itemId); - - gnome_keyring_attribute_list_free(attributes); - - if (result != GNOME_KEYRING_RESULT_OK) { - qWarning() << "GnomeKeyringPasswordBackend::addEntry Cannot add entry to keyring!"; - } - - stored.id = itemId; + storeEntry(stored); m_allEntries.append(stored); } @@ -263,6 +268,22 @@ void GnomeKeyringPasswordBackend::initialize() return; } + bool migrate = false; + if (result == GNOME_KEYRING_RESULT_NO_MATCH) { + result = gnome_keyring_find_itemsv_sync(GNOME_KEYRING_ITEM_GENERIC_SECRET, &found, + "application", GNOME_KEYRING_ATTRIBUTE_TYPE_STRING, "QupZilla", + NULL); + + if (result != GNOME_KEYRING_RESULT_OK && result != GNOME_KEYRING_RESULT_NO_MATCH) { + qWarning() << "GnomeKeyringPasswordBackend::initialize Cannot read items from keyring!"; + return; + } + + if (result == GNOME_KEYRING_RESULT_OK) { + migrate = true; + } + } + GList* tmp = found; while (tmp) { @@ -273,5 +294,11 @@ void GnomeKeyringPasswordBackend::initialize() gnome_keyring_found_list_free(found); + if (migrate) { + for (PasswordEntry &entry : m_allEntries) { + storeEntry(entry); + } + } + m_loaded = true; } diff --git a/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp index e37cdc441..c836d2cc3 100644 --- a/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp +++ b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp @@ -164,14 +164,23 @@ void KWalletPasswordBackend::initialize() return; } + bool migrate = !m_wallet->hasFolder("Falkon") && m_wallet->hasFolder("QupZilla"); + if (!m_wallet->hasFolder("Falkon") && !m_wallet->createFolder("Falkon")) { qWarning() << "KWalletPasswordBackend::initialize Cannot create folder \"Falkon\"!"; return; } - if (!m_wallet->setFolder("Falkon")) { - qWarning() << "KWalletPasswordBackend::initialize Cannot set folder \"Falkon\"!"; - return; + if (migrate) { + if (!m_wallet->setFolder("QupZilla")) { + qWarning() << "KWalletPasswordBackend::initialize Cannot set folder \"QupZilla\"!"; + return; + } + } else { + if (!m_wallet->setFolder("Falkon")) { + qWarning() << "KWalletPasswordBackend::initialize Cannot set folder \"Falkon\"!"; + return; + } } QMap entries; @@ -188,6 +197,17 @@ void KWalletPasswordBackend::initialize() } ++i; } + + if (migrate) { + if (!m_wallet->setFolder("Falkon")) { + qWarning() << "KWalletPasswordBackend::initialize Cannot set folder \"Falkon\"!"; + return; + } + + foreach (const PasswordEntry &entry, m_allEntries) { + m_wallet->writeEntry(entry.id.toString(), encodeEntry(entry)); + } + } } KWalletPasswordBackend::~KWalletPasswordBackend()