mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
Improve cppcheck configuration
- Ignore autotests sources - Teach cppcheck about a okular specific define - Keep the default options from the KDE setup This at least for me brings the cppcheck entries from "unusable" to "something that probably should be looked into"
This commit is contained in:
parent
f7bc35a856
commit
22550bbc05
|
@ -27,3 +27,8 @@ Dependencies:
|
||||||
- 'on': ['Android']
|
- 'on': ['Android']
|
||||||
'require':
|
'require':
|
||||||
'frameworks/kirigami': '@stable'
|
'frameworks/kirigami': '@stable'
|
||||||
|
|
||||||
|
Options:
|
||||||
|
cppcheck-arguments: '--enable=warning,style,performance -DOKULAR_EXPORT_PLUGIN'
|
||||||
|
cppcheck-ignore-files:
|
||||||
|
- autotests
|
||||||
|
|
|
@ -41,10 +41,10 @@ public:
|
||||||
const RecentItemsModel *model = static_cast<RecentItemsModel *>(aModel);
|
const RecentItemsModel *model = static_cast<RecentItemsModel *>(aModel);
|
||||||
const RecentItemsModel::RecentItem *item = model->getItem(index);
|
const RecentItemsModel::RecentItem *item = model->getItem(index);
|
||||||
|
|
||||||
bool willOpenMenu = false;
|
|
||||||
QPoint menuPosition;
|
QPoint menuPosition;
|
||||||
|
|
||||||
if (item != nullptr) {
|
if (item != nullptr) {
|
||||||
|
bool willOpenMenu = false;
|
||||||
if (event->type() == QEvent::ContextMenu) {
|
if (event->type() == QEvent::ContextMenu) {
|
||||||
willOpenMenu = true;
|
willOpenMenu = true;
|
||||||
menuPosition = static_cast<QContextMenuEvent *>(event)->globalPos();
|
menuPosition = static_cast<QContextMenuEvent *>(event)->globalPos();
|
||||||
|
|
Loading…
Reference in a new issue