diff options
author | Benjamin ROBIN <dev@benjarobin.fr> | 2024-01-14 18:17:07 +0100 |
---|---|---|
committer | Yordan Karadzhov <y.karadz@gmail.com> | 2024-01-20 14:21:50 +0200 |
commit | d19c721ea37bacd1fc93337653131f8a64049a7d (patch) | |
tree | 7978f6e2d18807aed196b9f4e6a5a892c29166de | |
parent | fa9b84c385f163f5686caa641e768d486ca73230 (diff) | |
download | kernel-shark-d19c721ea37bacd1fc93337653131f8a64049a7d.tar.gz |
kernelshark: Fix detaching-temporary Clazy warning
Use QList::at() instead of QList::operator[]()
Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Signed-off-by: Yordan Karadzhov <y.karadz@gmail.com>
-rw-r--r-- | src/KsTraceViewer.cpp | 4 | ||||
-rw-r--r-- | src/KsUtils.hpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/KsTraceViewer.cpp b/src/KsTraceViewer.cpp index 5e8e63f9..86e9185a 100644 --- a/src/KsTraceViewer.cpp +++ b/src/KsTraceViewer.cpp @@ -624,11 +624,11 @@ void KsTraceViewer::_resizeToContents() * column by hand. */ col = KsViewModel::TRACE_VIEW_COL_STREAM; - columnSize = STRING_WIDTH(_model.header()[col]) + FONT_WIDTH; + columnSize = STRING_WIDTH(_model.header().at(col)) + FONT_WIDTH; _view.setColumnWidth(col, columnSize); col = KsViewModel::TRACE_VIEW_COL_CPU; - columnSize = STRING_WIDTH(_model.header()[col]) + FONT_WIDTH * 2; + columnSize = STRING_WIDTH(_model.header().at(col)) + FONT_WIDTH * 2; _view.setColumnWidth(col, columnSize); col = KsViewModel::TRACE_VIEW_COL_INDEX; diff --git a/src/KsUtils.hpp b/src/KsUtils.hpp index 85f81c38..67af99ac 100644 --- a/src/KsUtils.hpp +++ b/src/KsUtils.hpp @@ -25,10 +25,10 @@ #include "KsPlotTools.hpp" /** Macro providing the height of the screen in pixels. */ -#define SCREEN_HEIGHT QGuiApplication::screens()[0]->geometry().height() +#define SCREEN_HEIGHT QGuiApplication::screens().at(0)->geometry().height() /** Macro providing the width of the screen in pixels. */ -#define SCREEN_WIDTH QGuiApplication::screens()[0]->geometry().width() +#define SCREEN_WIDTH QGuiApplication::screens().at(0)->geometry().width() //! @cond Doxygen_Suppress |