Commit graph

19 commits

Author SHA1 Message Date
Sune Vuorela 792425fc77 s/qAsConst/std::as_const/
We now definitely has std::as_const available and Qt has started nagging
about converting to std::as_const.

Implementation is the same for both functions, and qAsConst was a
stop-gap measure until std::as_const was sufficiently available.
2023-12-19 11:46:24 +00:00
Sune Vuorela 88fc4032ac Random collection of cppcheck fixes
- missing consts
 - shadowing of variable names
 - superflous code
 - tighter scoping of some variables
 and other such bits
2023-08-10 22:47:57 +00:00
Sune Vuorela d816a4cded Remove unneeded semicolon 2023-08-02 14:21:23 +02:00
Sune Vuorela 0c383d8cfc Random minor/pedantic fixes 2023-06-17 11:04:41 +00:00
Sune Vuorela 763328a6ba Better dialog for selecting certificates
Instead of just a simple list of "nickname"'s which is kind of like the
signing backend's internal ID for a given certificate, provide some more
context to each key.

This is a slight improvement, not a complete overhaul.
2023-05-03 13:41:14 +00:00
Sune Vuorela 9876bef3bb Simple deprecation: DefaultLocaleLongDate 2023-05-03 09:42:45 +00:00
Sune Vuorela a16b564a26 deprecation fix. locale date stringformat 2023-04-22 16:49:46 +00:00
Sune Vuorela c7bd071a68 Show location in signature panel as well if provided 2023-04-19 20:45:23 +00:00
Willyanto Willyanto 647cdc40d0 Perform some initializations in initialization list
Fixes some variable is assigned in constructor body. Consider performing
initialization in initialization list. (CWE-398)
2023-03-23 17:37:37 +00:00
Max Mueggler 8c61b6a2b4 Fixed issue with occasional mis-sized tile
It turns out that there were two issues at play here: rounding errors
meant that pixmaps were almost never the same size as pagePainter
thought the tiles should be, and the tile-is-the-size-it-should-be code
path was broken (but only hit in rare cases, seemingly at random).

To help with rounding errors in the future, I added a geometryF function
to NormalizedRect that returns a QRectF. In general,
device-independent-pixel points/rects should be floating point, and
device-pixel rects should be integer.
2022-11-30 08:39:26 +00:00
Max Mueggler 521ea660ee Remove unnecessary copying from paintCroppedPageOnPainter
PagePainter::paintCroppedPageOnPainter had a few calls to
QPixmap::setDevicePixelRatio on pixmaps it does not own, which detaches
the pixmap, making a deep copy. It turns out these were all unnecessary.
It also copied scaled before drawing them onto the painter.

I've tested all the changes except for the annotation stamps, which I'm
just assuming works like the others.

Also ran clang-format.
2022-11-30 08:39:26 +00:00
Albert Astals Cid 0d40301d50 Add a few definitions that will come with ECM 5.85
Better enforce them now, so that the work to port doesn't increase over
time

Not a super fan of this for regular applications, but oh well the ship
has sailed
2022-04-07 23:02:12 +00:00
Albert Astals Cid 252236d413 Port a few more QLinkedList to QList
We don't need the special properties of QLinkedList in any of those and
QLinkedList is deprecated, so move away from it
2022-03-31 17:08:01 +02:00
Albert Astals Cid ce8401e917 Don't require KF5::IconThemes for Mobile
It just gives us a 48px = Large, so not worth to have that extra dependency for
that in my opinion
2022-03-29 12:56:04 +00:00
Albert Astals Cid 0741ef1838 Port away from more QLinkedLists
QLinkedList is gone from Qt6

The almost 1:1 port is std::list but we don't need iterator stability on
removal/insertion so just port to QList
2022-03-22 12:58:59 +01:00
Albert Astals Cid 6767b8739e Port a few QLinkedList to QList
QLinkedList is deprecated in later Qt5 and gone in Qt6

The 1:1 port is std::list but in this cases all we ever do
is create the lists, push back to them, and pass then around
to be read, for that a QList is more than enough
2022-03-19 11:22:55 +00:00
Albert Astals Cid ba35bbd9e6 emit -> Q_EMIT
A future ECM is going to force that on us, so do it early
2022-03-19 10:58:47 +00:00
Volker Krause 50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +01:00
Albert Astals Cid 4cd6bfd30e mobile: Add Signature Viewing UI
Move a few files from part/ to gui/ since they are also used by the
mobile/ frontend
2022-02-18 08:32:13 +00:00