Commit graph

8695 commits

Author SHA1 Message Date
Albert Astals Cid 93540ac16d Enable most of clazy level2 2020-02-21 14:57:48 +01:00
Albert Astals Cid 968e9d6073 Enable clazy old-style-connect 2020-02-20 15:48:08 +01:00
Albert Astals Cid a9598e83e8 Enable all of clazy level1 2020-02-20 13:35:35 +01:00
Albert Astals Cid c10faf0926 Enable clazy qproperty-without-notify 2020-02-20 12:53:28 +01:00
Albert Astals Cid edb44b1fd3 Enable clazy connect-3arg-lambda 2020-02-20 12:42:34 +01:00
Albert Astals Cid 91bce4a0a3 Enable clazy const-signal-or-slot 2020-02-20 12:42:23 +01:00
Albert Astals Cid e03943fae9 Enable clazy qstring-lef 2020-02-20 12:03:31 +01:00
Albert Astals Cid 93de247795 Enable all of clazy level0 2020-02-20 11:34:47 +01:00
Albert Astals Cid f85deae680 Enable clazy container-anti-pattern
Yes, this is a bit of cheating, but there's really no nicer way of doing
this and memory/speed here is not really important so we can trick clazy
2020-02-20 11:22:57 +01:00
Albert Astals Cid 3ca05fc1f8 Enable clazy qstring-insensitive-allocation 2020-02-20 11:15:15 +01:00
Albert Astals Cid beb195c9e6 Enable clazy qcolor-from-literal 2020-02-20 11:12:00 +01:00
Albert Astals Cid 8e35b43a3d Enable clazy unused-non-trivial-variable 2020-02-20 11:08:04 +01:00
Albert Astals Cid 0a60ab54c4 Enable clazy qstring-ref 2020-02-20 11:01:58 +01:00
Albert Astals Cid 95e19450c9 Enable clazy fully-qualified-moc-types 2020-02-20 10:59:54 +01:00
Albert Astals Cid 3b4dd35c9f Enable clazy lambda-in-connect 2020-02-20 10:57:47 +01:00
Albert Astals Cid eddbe03128 enable clazy strict-iterators 2020-02-20 10:15:24 +01:00
Albert Astals Cid e54609b596 CI: rename to show we're also running clazy 2020-02-19 23:44:41 +01:00
Albert Astals Cid 468f4b64c2 CI: Enable clazy inefficient-qlist-soft 2020-02-19 23:44:41 +01:00
Albert Astals Cid e2a1705703 CI: Enable clazy connect-not-normalized 2020-02-19 23:44:41 +01:00
Albert Astals Cid 3af705b3d7 CI: Enable clazy qdeleteall 2020-02-19 23:44:41 +01:00
Albert Astals Cid a23709b097 CI: Enable clazy range-loop 2020-02-19 23:44:41 +01:00
Albert Astals Cid 82d5810493 CI: Enable clazy detaching-temporary 2020-02-19 23:44:41 +01:00
Albert Astals Cid 6ddb7e6cc9 CI: Enable clazy qhash-namespace 2020-02-19 23:44:41 +01:00
Albert Astals Cid 1a05112be1 CI: enable clazy incorrect-emit 2020-02-19 23:44:41 +01:00
Albert Astals Cid 96f00a4d29 CI: Enable clazy qstring-arg check 2020-02-19 23:44:37 +01:00
Albert Astals Cid 5ecbb51f77 Enable modernize-use-nullptr 2020-02-19 18:10:05 +01:00
Andi Sardina Ramos d9069ef661 The shell and the part need to be independent of each other.
This reverts commit 931425987ab9138bd843e02488dfaa6fa1afd52f.
2020-02-16 23:33:56 +00:00
l10n daemon script f2274e8992 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-02-14 05:55:12 +01:00
Yuri Chornoivan 5c6a297feb Fix minor EBN issues 2020-02-13 11:47:51 +02:00
Harri Porten c1afa356c0 Restrict time given for JavaScript evaluation to max. 2 seconds.
Possible improvement: alert the user of the timeout and offer
the option to continue or abort execution.
2020-02-11 22:34:46 +00:00
Albert Astals Cid 99b4f276e1 Clear m_openError before opening 2020-02-11 00:27:46 +01:00
Albert Astals Cid 18873d18a2 Document the since for Document::openError 2020-02-11 00:25:04 +01:00
Albert Astals Cid 987abf54d7 Move the private slot to a lambda
This way we don't need a private function in a public class
2020-02-11 00:25:00 +01:00
Andi Sardina Ramos c549d28f7f Solving the creation of an additional tab for a deleted file.
BUG: 412978
BUG: 412979
2020-02-10 23:22:06 +00:00
Albert Astals Cid cb3426d024 Fix crash when not in viewer mode
BUGS: 417118
2020-02-10 00:42:31 +01:00
Albert Astals Cid a96c082d69 Build desktop User Interface by default
Can choose to only build mobile interface or both
2020-02-06 22:26:00 +01:00
l10n daemon script 0d5bd0bc43 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-02-04 06:09:17 +01:00
David Hurka c6d937ab0d Replace ToolAction by ToggleActionMenu
Summary:
This replaces ToolAction by a near-drop-in replacement named ToggleActionMenu. The new annotation toolbar already uses this (D15580).

Unlike ToolAction, ToggleActionMenu inherits from KActionMenu to be more flexible.
* Menu can be set from outside, not hard coded.
* Default action for toolbar button is controllable from outside. (Theoretically, the button could trigger //anything// now.)
* KActionMenu instead of KSelectAction:
  - Pluggable in other menus, thus called “Menu”.
  - Doesn’t make the actions exclusive, so //any// actions can be added to the menu.
* ImplicitDefaultAction mode can choose the default action of the toolbar buttons automatically, by looking for the first checked action in the menu.

Toolbar buttons use the default action //of// this menu, not this menu itself as action.

Because the default action is configurable now, D21622 and D21635 (where we tried to fine-tune ToolAction) become obsolete.

Screenshot:
Everything like before, here with mouse_selecttool added to Tools menu to show submenu capability.
{F6884228}

Test Plan:
ToolAction replacement and ImplicitDefaultAction mode:
 * Open Okular and look at toolbar button -> has correct tool selected.
 * Open a document.
 * Look at toolbar button menu -> Correct menu entries (like before, with ToolAction).
 * Select some selection tools through shortcuts and toolbar button -> behaves correctly.
Usage as submenu:
 * Add ToggleActionMenu ("mouse_selecttool") to menubar (..../kxmlgui5/okular/part.rc) -> Submenu looks correctly, has no checkbox attached and so on...
Toolbar buttons:
 * Add diverse other actions to the menu -> still works as before.
 * Add actions when toolbar buttons are already created -> actions are added to existing buttons.
 * setDefaultAction() to some completely unrelated action. -> ToggleActionMenu does not get confused.

Reviewers: simgunz

Reviewed By: simgunz

Subscribers: aacid, ngraham, simgunz, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D21971
2020-02-02 01:33:33 +01:00
l10n daemon script 5dfbee0a00 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-02-01 05:46:42 +01:00
Albert Astals Cid b82682037e Merge remote-tracking branch 'origin/release/19.12' 2020-01-31 10:22:59 +01:00
l10n daemon script 134c16efdc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-01-31 09:40:26 +01:00
l10n daemon script f6ee1a3b24 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-01-31 05:46:31 +01:00
Tobias Deiminger 378e99d719 Fix race condition in generator.cpp
The check whether to allocate a new QMutex was unprotected.
Two threads may check and allocate concurrently, but only one pointer gets
remembered, the other one will leak. In worst case the returned
mutex is different for two threads, so that two threads try to
synchronize by using two different mutexes.
2020-01-30 09:42:17 +01:00
Tobias Deiminger 593803b0a1 Fix render stop and high load due to timing issue
Text generation is connected to pixmap generation thread started signal.
However the signal may have been emitted faster than the connect could took place,
and because started is fired only once, the connected lambda never got executed.

generatePixmap tried to sync up with that never happening text generation anyway
by means of scheduling itself. This lead to a infinite loop via a no more sleeping QEventLoop.

Fixed by moving the connect in front of starting the thread.

BUG: 396137
BUG: 396087
CCBUG: 403643
2020-01-30 09:15:40 +01:00
l10n daemon script aae406bd80 GIT_SILENT made messages (after extraction) 2020-01-29 02:58:10 +01:00
l10n daemon script 79de5d3958 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-01-28 05:42:48 +01:00
l10n daemon script a5eda6348f GIT_SILENT made messages (after extraction) 2020-01-28 03:10:03 +01:00
Oliver Sander fdab280888 Unit test for navigating the viewport history 2020-01-26 19:06:57 +01:00
Ahmad Samir 4a4456abd7 Port QRegExp to QRegularExpression in a couple of locations
Some instances of QRegExp are still left:
generators/mobipocket and generators/epub
2020-01-26 11:40:33 +00:00
Albert Astals Cid 2da1cd736a CI: Enable clang-tidy modernize-loop-convert 2020-01-24 17:23:39 +01:00