1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 17:42:10 +01:00
Commit Graph

697 Commits

Author SHA1 Message Date
David Rosca
fa4fba5f49 BrowserWindow: Add tabCount() method 2018-01-11 19:23:43 +01:00
David Rosca
5cc41d219e Always open new window when restoring session after crash
Also remove special handling for qupzilla:restore tabs.
2018-01-11 19:23:36 +01:00
David Rosca
3f60c554ee ClosedWindowsManager: Save closed windows into session file 2018-01-11 19:21:59 +01:00
David Rosca
0b6c555c62 Only show restore page when crashing during session restore
If app crashes during one minute after restoring crashed session,
show the restore page with options to the user next time instead
of showing restore page after every crash.
2018-01-11 19:21:54 +01:00
David Rosca
c85d33e92a MainApplication: Completely remove isRestoring state
Restoring session should not be any different from simply opening
regular session.
2018-01-11 19:21:47 +01:00
David Rosca
f2002892aa Save previous crashed session that were not restored to session file
Closes #2331
2018-01-11 19:21:17 +01:00
David Rosca
482f446712 RestoreManager: Make RestoreData into a struct with stream operators
This makes it possible to extend it while keeping backwards compatibility.
2018-01-11 19:09:44 +01:00
Luís Pereira
0096801556 Don't call non-const member functions on temporaries
They can detach if the container is shared. Even if they are not shared,
using const method when possible is good practice.

Differential Revision: https://phabricator.kde.org/D9730
2018-01-11 19:05:56 +01:00
David Rosca
ee62ad0215 Use correct web settings in private browsing mode
Closes #2427
2018-01-02 22:59:17 +01:00
David Rosca
72c6a73e29 MainApplication: Fix opening session with SelectSession after launch action 2018-01-02 22:56:49 +01:00
David Rosca
1aa4b41151 BrowserWindow: Save sidebar for each window
Allows to have different sidebar on each window.
2018-01-02 22:56:41 +01:00
David Rosca
1de32182c1 BrowserWindow: Don't restore first app window from postLaunch slot
Instead restore it immediately after creation from MainApplication
as all other window types.
2018-01-02 22:55:58 +01:00
David Rosca
6b08e17dcd BrowserWindow: Save ui state separately for each window 2018-01-02 22:55:50 +01:00
David Rosca
423e06c7d6 BrowserWindow: Always save/restore window geometry 2018-01-02 22:55:19 +01:00
David Rosca
ed39aefdad Change structure of session file + also save window geometry
Bump session file version to 4.

Added support for old version to RestoreManager to prevent losing
old saved sessions.
2018-01-02 22:55:09 +01:00
David Rosca
25b1583770 Fix merge issues 2018-01-02 15:22:35 +01:00
David Rosca
a578314e8e MainMenu: Remove all aboutToHide menu handling
Instead create conflicting shortcuts with Qt::WidgetShortcut context.
2018-01-02 15:15:20 +01:00
David Rosca
ef06ed567a Add ClosedWindowsManager allowing to restore closed windows
Closes #2306
2018-01-02 15:03:11 +01:00
David Rosca
b3bd08c5e4 BrowserWindow: Add SavedWindow struct and use it for saving/restoring 2018-01-02 15:01:16 +01:00
David Rosca
4b33364516 Update copyright year to 2018 2018-01-01 16:59:46 +01:00
David Rosca
f5ad4424aa TabWidget: Add insertView method for WebTab 2018-01-01 16:58:02 +01:00
David Rosca
0e25eb2e92 SuperMenu: Remove session manager actions in private mode 2018-01-01 16:57:09 +01:00
David Rosca
3aa629ceac BrowserWindow: Make sure window is shown before restoring session
Same reasoning as 639ecf3626dc5fa667acb17fa35bc398bdaf4712
2017-12-30 18:06:14 +01:00
David Rosca
5ecf3d8b98 Remove leftover references to no longer used pinnedtabs.dat file 2017-12-30 18:06:06 +01:00
David Rosca
397e2f714e Set default button for all CheckBoxDialogs
Default button is now focused instead of checkbox.
2017-12-30 18:05:47 +01:00
David Rosca
53f6ef91ac Temporarily enable JavaScript when loading qupzilla:restore page 2017-12-30 18:04:43 +01:00
David Rosca
736e3121bc BrowserWindow: Show window before creating web views
Otherwise QWebEngineView first creates its underlying view with very
small size which then gets resized to correct size on first show event.

Also remove all calls to setUpdatesEnabled on window during session restore,
it doesn't seem to have any effect anymore.
2017-12-30 18:04:11 +01:00
David Rosca
c1c168aae9 Create every QSqlQuery with correct database for current thread
Queries are now always executed on correct database instance.
Databases are also stored in thread local storage instead of in hash
table with mutex.

Closes #2498
2017-12-18 13:06:42 +01:00
David Rosca
fba7b3d9fc Fix saving window state when closing app with Ctrl+Q shortcut
Closes #2444
2017-12-05 13:51:29 +01:00
David Rosca
ee5a11ae72 Fix initial focus when opening new browser window
Web page is now correctly focused when opening browser window
or opening/restoring sessions.

This is still not absolutely reliable solution as it uses delay
to change focus to webview, because QWebEngineView doesn't accept
focus until after it is initialized.
2017-12-03 19:10:34 +01:00
David Rosca
b03c5f3cb0 MainApplication: Don't call processEvents when restoring session
It seems to help with QtWebEngine crashes during session restore
2017-12-03 19:10:18 +01:00
David Rosca
687f797f27 Fix switching focus when loading url with BrowserWindow::loadAddress
Also accept key events when handled

Closes #2504
2017-12-03 19:10:10 +01:00
David Rosca
0049c2b7ac ProfileManager: Create database structure from SQL
Instead of copying pre-made binary database, create tables from SQL.
2017-11-13 13:25:30 +01:00
David Rosca
b6288358ef Don't create temporary dir in $HOME
BUG: 386235
2017-10-27 14:22:39 +02:00
David Rosca
9c3f38fa11 Fix installing and loading plugins 2017-10-27 14:14:40 +02:00
David Rosca
d3f4b59d66 Remove no longer working USE_LIBPATH build option 2017-10-27 13:33:45 +02:00
Razi Alavizadeh
ebd8dd051e Windows: Fix compile issues after build system changed to cmake.
Differential Revision: https://phabricator.kde.org/D8079
2017-10-03 11:03:35 +03:30
Luigi Toscano
3c67be06b9 Fix UI strings with plural forms
Otherwise those strings can not be extracted.
2017-09-26 01:37:46 +02:00
Harald Sitter
b60b2e36e9 port DataPaths to QStandardPaths backing
Summary:
This streamlines the code across all platforms and outsources the path
building to QSP which implements the multi-platform logic.

This keeps AppData lookup paths where they were (with additional lookup
paths from QSP).
Config location changes on Windows (from local to roaming) and OS X
(from `Application Support` to `Preferences`).
Cache also changes location on Windows and OS X.

Temporary directory management is entirely outsourced to QTemporaryDir
which is kept in a scoped pointer so it gets cleaned up on exit.

Reviewers: drosca

Reviewed By: drosca

Differential Revision: https://phabricator.kde.org/D7767
2017-09-18 12:57:23 +02:00
Harald Sitter
2b3b95ae36 change qapp applicationName to lower case
Summary:
NB: this changes the standard config name of default constructed QSettings
  (a quick grep seems to suggest there is no default constructed QSettings
   though, so this should be fine).

Aligning the applicationName with the spelling in the installation paths
on case sensitive systems allows us to use QStandardPaths' built-in
handling for application-specific paths instead of having to manually
append /falkon to various paths.

Test Plan: still seems to be working on linux

Reviewers: drosca

Reviewed By: drosca

Differential Revision: https://phabricator.kde.org/D7721
2017-09-11 14:13:47 +02:00
David Faure
d69e5458f9 First steps towards a cmake buildsystem, currently only builds src/lib.
USE_DATADIR no longer exists, QStandardPaths::standardLocations is used
unless NO_SYSTEM_DATAPATH is set.
2017-09-09 20:27:44 +02:00
Harald Sitter
58e4b9a3a7 extend data paths with standard paths from QStandardPaths
Summary:
this is, for now, backwards compatible. in the long run a full move
to QSP instead of manually doing path lookup would be good though.
as that ideally means aligning capitalization between appname and on-disk
paths we'll avoid that for now.

fixes data lookup from XDG paths making the binary partially relocatable
and properly configurable via XDG paths (e.g. corporate branding or what
have you)

Test Plan: - theme path resolution now walks all XDG paths

Reviewers: drosca

Reviewed By: drosca

Differential Revision: https://phabricator.kde.org/D7600
2017-08-29 14:38:46 +02:00
David Rosca
efff69b7b2 Continue with Falkon renaming 2017-08-25 17:55:52 +02:00
David Rosca
d00e769749 Initial rename to Falkon 2017-08-25 17:32:32 +02:00
srazi
a78b595569 Hide sidebar when a web element goes to full screen.
- Closes #2423
2017-08-23 14:02:26 +04:30
srazi
2aa25fe0b1 Windows: At first try to show native default app settings UI (>=Vista). 2017-08-22 14:19:22 +02:00
srazi
21b2685375 Windows: Remove support to set QupZilla as default FTP handler.
- Closes #2417
2017-08-21 21:45:32 +04:30
David Rosca
08274f5bbe Fix build warning 2017-08-19 19:11:45 +02:00
David Rosca
5812721e48 BrowserWindow: Fix failing to enter fullscreen sometimes 2017-08-19 18:52:26 +02:00
David Rosca
aefc3eba38 Disable QWebEngineSettings::FocusOnNavigationEnabled
Keeping this enabled will focus views loaded in background tabs.

Closes #2352
2017-07-19 13:06:25 +02:00
David Rosca
93d4d66054 SessionManager: Add Session Manager dialog instead of menu structure
See #2331
2017-06-08 14:13:15 +02:00
David Rosca
f62665b9d9 SuperMenu: Move help actions to Help submenu
Also move Preferences action above About action
2017-06-08 11:13:22 +02:00
David Rosca
0d2b8b6b81 Change linux desktop file name to org.qupzilla.QupZilla
Closes #2308
2017-06-06 17:56:49 +02:00
David Rosca
49eb9a862e Workaround Ctrl+F keypress being eaten by QtWebEngine 5.9 2017-05-29 17:21:56 +02:00
srazi
755ec16598 Session manager (#2293) 2017-04-07 10:02:27 +02:00
srazi
2654081912 Fix 2178 (#2292)
* CheckBoxDialog: Rewritten to inherit from QMessageBox

-  QMessageBox supports showing checkbox for Qt >= 5.2

* Add option to disable warning message when closing tabs from tabbar context menu.

- Closes #2178
2017-04-05 10:27:03 +02:00
David Rosca
f961958989 Add another key shortcut for reload action
Closes #2290
2017-04-03 15:34:44 +02:00
srazi
ade7b9c690 Refactor some codes related to sessions. (#2280) 2017-03-26 11:27:04 +02:00
srazi
345d03105f macOS: Fix global menu with multiple windows.
- Closes #2261
2017-03-20 11:37:33 +03:30
srazi
9af542aa03 macOS: Disable auto window tabbing (#2261) 2017-03-20 04:28:55 +03:30
David Rosca
076deb7cdd Set PulseAudio property overrides to QupZilla app name and icon
Closes #2262
2017-03-18 17:19:57 +01:00
David Rosca
bfef9e2c03 Merge branch 'v2.1' 2017-03-15 10:53:44 +01:00
David Rosca
d18be6f8e4 ProfileManager: Fix warning when creating new profile 2017-03-15 10:48:00 +01:00
David Rosca
e150e44cc6 Replace Q_OS_MAC with Q_OS_MACOS 2017-02-10 19:00:58 +01:00
David Rosca
8fa9db9f65 Show print preview dialog when printing page
Print directly to QPrinter instead of using intermediate pdf file.
2017-02-06 20:40:40 +01:00
David Rosca
1b365f1e86 Bring back Print Element Background option 2017-02-06 19:52:39 +01:00
David Rosca
13cba7a069 Bump minimum Qt to 5.8 2017-02-06 18:39:59 +01:00
David Rosca
4062473e98 Version 2.1.0 2017-02-04 10:47:24 +01:00
David Rosca
c6a7935a67 Fix MainApplication::styleName() 2017-01-31 21:37:12 +01:00
David Rosca
8e55c3ad3c Fix setting spellcheck languages 2017-01-27 22:46:30 +01:00
David Rosca
e18d2d90bd Register also as url handler for https scheme 2017-01-27 20:59:10 +01:00
Voldracarno Draconor
4729b24c64 Added: Remove cache on close (#2185) 2017-01-27 13:37:56 +01:00
David Rosca
f7005f8d95 NetworkManager: Remove NetworkUrlInterceptor in shutdown
Fixes potential crash on close
2017-01-26 12:35:21 +01:00
Voldracarno Draconor
7738deb721 Added option to delete all cookies on exiting (#2173) 2017-01-22 20:43:41 +01:00
David Rosca
8b992364c4 Fix setting cache maximum size 2017-01-22 09:22:22 +01:00
David Rosca
a049f44757 Each tab now has its own SearchToolBar
Also disable show/hide animations.

SearchToolBar is now above Web Inspector (if visible).
2017-01-21 17:43:41 +01:00
David Rosca
67452c1bf4 Reimplement Windows jumplist with Qt Windows Extras 2017-01-20 11:14:50 +01:00
David Rosca
3a612c07bd Fix Windows build 2017-01-20 11:14:41 +01:00
David Rosca
29bccf9984 Use Qt Windows Extras instead of custom QtWin 2017-01-20 09:58:13 +01:00
David Rosca
f15643b454 BrowserWindow: Restore window states last when leaving fullscreen 2017-01-20 09:37:00 +01:00
David Rosca
271d5f6555 Use Breeze icons as fallback icon set 2016-12-31 14:32:48 +01:00
David Rosca
3e18d17964 Remove icon from About Qt action 2016-12-28 21:35:27 +01:00
David Rosca
2b9e032ccb Always save session on closing browser 2016-12-27 18:55:58 +01:00
David Rosca
e9b226d477 Drop support for pinned tabs without saving session
Pinned tabs are saved alongside normal tabs in a session file.
If user don't have session restore enabled, pinned tabs are saved
and restored from a special pinnedtabs.dat file which uses different
codepath.
It has also another problem that it only saves pinned tabs for last
browser window, which sometimes may be confusing and lead to losing
the pinned tabs.
2016-12-27 18:40:20 +01:00
David Rosca
e9d1771114 ProfileManager: Only warn when using profile from QupZilla 1.x 2016-12-27 18:05:45 +01:00
David Rosca
8cfe4c4c5e Enable QWebEngineSettings::LocalContentCanAccessRemoteUrls 2016-12-27 14:25:08 +01:00
David Rosca
4d51b4c00c Use WebPage::SaveJsWorld for executing scripts
QWebChannel must still be registered on MainWorld
2016-12-26 16:45:47 +01:00
David Rosca
c25e6a99a6 BrowserWindow: Don't focus locationbar when starting with webpage 2016-12-26 14:35:08 +01:00
David Rosca
7c329b1281 ProxyStyle: Don't disable context menu on scrollbars 2016-12-26 13:01:41 +01:00
David Rosca
b5b2bf6a0b Automatically clear old icons and VACUUM database every 20 runs 2016-12-24 11:32:48 +01:00
David Rosca
f0c52c4a85 Fix build with latest QtWebEngine 2016-12-01 21:54:49 +01:00
David Rosca
4d9137a1d9 Add Spell Check config to Preferences
Spell checking now works with QtWebEngine >= 5.8
2016-10-25 23:36:53 +02:00
David Rosca
cf3fa88942 Require Qt 5.7 2016-10-24 20:11:50 +02:00
David Rosca
ce9d3983a0 Bring back Save Page action
Only with Qt >= 5.7

Closes #2083
2016-09-18 12:09:38 +02:00
Kevin Kofler
b9bd2338e4 Add initial printing support with QtWebEngine >= 5.7.0 (#2068)
* Add initial printing support with QtWebEngine >= 5.7.0

This works by printing to PDF first, then sending the PDF to a printer
if printing to a physical printer was requested.

On *nix (including Mac OS X), we use the lpr command, which is typically
provided by CUPS nowadays. Currently, no options beyond the printer name
are passed, there is room for improvement there. (Okular has a
FilePrinter class that handles this in a more sophisticated way.)

On Windows, we use ShellExecuteW with the "printto" verb. In that case,
the printer name is unfortunately the only thing that can be passed. The
user experience may also be suboptimal depending on the PDF viewer
installed on the system. (E.g., Adobe Reader is reported to ignore
SW_HIDE.) And if there is no PDF viewer installed at all, it will of
course not work at all. But it is the best we can do without bundling
something like GhostScript (or requiring the user to install it).

* Printing: Let lpr autoremove the temporary file instead of QTemporaryFile

Only lpr knows for sure when it is safe to delete the temporary file.

* Printing: Use the callback version of printToPdf instead of the file one

The file version is also asynchronous and does not report when it is
done.

* Printing: Use async QProcess API instead of QProcess::execute to run lpr

This also required making tempFile a QTemporaryFile * instead of a
QTemporaryFile on the stack, because QTemporaryFile is a QObject and
cannot be copied.

* Printing: Adapt the FilePrinter from Okular to pass correct lpr args

The license of those files is GPLv2+, which is compatible with
QupZilla's GPLv3+ licensing.
2016-09-14 14:07:07 +02:00
David Rosca
35657e6005 Mac: Fix opening urls from FileOpen event 2016-09-04 15:42:51 +02:00
blaze
bc47a9aba5 Show Bookmark Toolbar when Location Bar gets focus
Optional behaviour providing quick access to bookmarks without
wasting the vertical space
2016-08-23 08:57:11 +02:00
David Rosca
1a183e590b Merge branch 'v2.0' 2016-08-15 14:25:26 +02:00
David Rosca
cce94944f7 Don't hide supermenu button in fullscreen
Also make the supermenu button as last button in toolbar
2016-08-15 14:24:53 +02:00
Vlad
9ae6c12a3c Show navigation in new tab in fullscreen mode (#2055) 2016-08-15 14:24:35 +02:00