mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12:46:35 +01:00
Merge branch 'Falkon/3.0'
This commit is contained in:
commit
e01024942f
18
CHANGELOG
18
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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -9,3 +9,6 @@
|
||||
|
||||
/* Disable DBus support */
|
||||
#cmakedefine DISABLE_DBUS
|
||||
|
||||
/* QtWebEngine is at least version 5.10 */
|
||||
#cmakedefine01 HAVE_QTWEBENGINE_5_10
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -2419,9 +2419,6 @@
|
||||
<property name="dragDropMode">
|
||||
<enum>QAbstractItemView::InternalMove</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
|
@ -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<QString> webPageTypes = {
|
||||
QSL("text/html"),
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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<QString, QByteArray> 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()
|
||||
|
Loading…
Reference in New Issue
Block a user