mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12:46:35 +01:00
Fixed some little issues.
-show default browser dialog after application window completely rendered and correct default checked state -show host instead URL in authentication dialog
This commit is contained in:
parent
d75ab566ef
commit
45830b1917
@ -286,14 +286,6 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||
int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 1).toInt();
|
||||
settings.setValue("SessionRestore/isRunning", true);
|
||||
|
||||
#ifndef PORTABLE_BUILD
|
||||
bool alwaysCheckDefaultBrowser = settings.value("Web-Browser-Settings/CheckDefaultBrowser", DEFAULT_CHECK_DEFAULTBROWSER).toBool();
|
||||
if (alwaysCheckDefaultBrowser) {
|
||||
alwaysCheckDefaultBrowser = checkDefaultWebBrowser();
|
||||
settings.setValue("Web-Browser-Settings/CheckDefaultBrowser", alwaysCheckDefaultBrowser);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (checkUpdates) {
|
||||
new Updater(qupzilla);
|
||||
}
|
||||
@ -329,6 +321,15 @@ void MainApplication::postLaunch()
|
||||
|
||||
connect(this, SIGNAL(messageReceived(QString)), this, SLOT(receiveAppMessage(QString)));
|
||||
connect(this, SIGNAL(aboutToQuit()), this, SLOT(saveSettings()));
|
||||
|
||||
#ifndef PORTABLE_BUILD
|
||||
Settings settings;
|
||||
bool alwaysCheckDefaultBrowser = settings.value("Web-Browser-Settings/CheckDefaultBrowser", DEFAULT_CHECK_DEFAULTBROWSER).toBool();
|
||||
if (alwaysCheckDefaultBrowser) {
|
||||
alwaysCheckDefaultBrowser = checkDefaultWebBrowser();
|
||||
settings.setValue("Web-Browser-Settings/CheckDefaultBrowser", alwaysCheckDefaultBrowser);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainApplication::loadSettings()
|
||||
@ -951,9 +952,10 @@ bool MainApplication::checkDefaultWebBrowser()
|
||||
#ifdef Q_OS_WIN
|
||||
bool showAgain = true;
|
||||
if (!associationManager()->isDefaultForAllCapabilities()) {
|
||||
CheckBoxDialog dialog(QDialogButtonBox::Yes | QDialogButtonBox::No);
|
||||
CheckBoxDialog dialog(QDialogButtonBox::Yes | QDialogButtonBox::No, getWindow());
|
||||
dialog.setText(tr("QupZilla is not currently your default browser. Would you like to make it your default browser?"));
|
||||
dialog.setCheckBoxText(tr("Always perform this check when starting QupZilla."));
|
||||
dialog.setDefaultCheckState(Qt::Checked);
|
||||
dialog.setWindowTitle(tr("Default Browser"));
|
||||
dialog.setIcon(qIconProvider->standardIcon(QStyle::SP_MessageBoxWarning));
|
||||
|
||||
|
@ -235,12 +235,12 @@ private:
|
||||
#if (QT_VERSION < 0x050000)
|
||||
bool winEvent(MSG* message, long* result);
|
||||
#else
|
||||
void paintEvent(QPaintEvent* event);
|
||||
bool nativeEvent(const QByteArray &eventType, void* _message, long* result);
|
||||
#endif
|
||||
|
||||
void applyBlurToMainWindow(bool force = false);
|
||||
|
||||
void paintEvent(QPaintEvent* event);
|
||||
bool eventFilter(QObject* object, QEvent* event);
|
||||
#endif
|
||||
|
||||
|
@ -279,7 +279,7 @@ void NetworkManager::authentication(QNetworkReply* reply, QAuthenticator* auth)
|
||||
connect(box, SIGNAL(accepted()), dialog, SLOT(accept()));
|
||||
|
||||
label->setText(tr("A username and password are being requested by %1. "
|
||||
"The site says: \"%2\"").arg(reply->url().toEncoded(), QzTools::escape(auth->realm())));
|
||||
"The site says: \"%2\"").arg(reply->url().host(), QzTools::escape(auth->realm())));
|
||||
formLa->addRow(label);
|
||||
|
||||
formLa->addRow(userLab, user);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -48,6 +48,11 @@ bool CheckBoxDialog::isChecked() const
|
||||
return ui->checkBox->isChecked();
|
||||
}
|
||||
|
||||
void CheckBoxDialog::setDefaultCheckState(Qt::CheckState state)
|
||||
{
|
||||
ui->checkBox->setChecked(state == Qt::Checked);
|
||||
}
|
||||
|
||||
int CheckBoxDialog::exec()
|
||||
{
|
||||
ui->buttonBox->setFocus();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -40,6 +40,7 @@ public:
|
||||
void setCheckBoxText(const QString &text);
|
||||
|
||||
bool isChecked() const;
|
||||
void setDefaultCheckState(Qt::CheckState state);
|
||||
|
||||
public slots:
|
||||
int exec();
|
||||
|
Loading…
Reference in New Issue
Block a user