mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +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']
|
||||
'require':
|
||||
'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::RecentItem *item = model->getItem(index);
|
||||
|
||||
bool willOpenMenu = false;
|
||||
QPoint menuPosition;
|
||||
|
||||
if (item != nullptr) {
|
||||
bool willOpenMenu = false;
|
||||
if (event->type() == QEvent::ContextMenu) {
|
||||
willOpenMenu = true;
|
||||
menuPosition = static_cast<QContextMenuEvent *>(event)->globalPos();
|
||||
|
|
Loading…
Reference in a new issue