Skip to content

Commit

Permalink
Avoid unused variable warning in qfilesystemmodel.cpp
Browse files Browse the repository at this point in the history
2135:5: warning: unused variable 'q' [-Wunused-variable]
    2135 |     Q_Q(QFileSystemModel);
         |     ^~~~~~~~~~~~~~~~~~~~~

The variable is only required for the feature filesystemwatcher.

Pick-to: 6.9 6.8
Change-Id: I5da48f94118179ec20fec7da7169b7f22cec17fe
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
  • Loading branch information
SmallLars committed Dec 26, 2024
1 parent 92373d3 commit 46dddcb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gui/itemmodels/qfilesystemmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2134,8 +2134,6 @@ QFileSystemModelPrivate::~QFileSystemModelPrivate()
*/
void QFileSystemModelPrivate::init()
{
Q_Q(QFileSystemModel);

delayedSortTimer.setSingleShot(true);

qRegisterMetaType<QList<std::pair<QString, QFileInfo>>>();
Expand All @@ -2146,6 +2144,7 @@ void QFileSystemModelPrivate::init()
this, &QFileSystemModelPrivate::fileSystemChanged);
QObjectPrivate::connect(fileInfoGatherer.get(), &QFileInfoGatherer::nameResolved,
this, &QFileSystemModelPrivate::resolvedName);
Q_Q(QFileSystemModel);
q->connect(fileInfoGatherer.get(), &QFileInfoGatherer::directoryLoaded,
q, &QFileSystemModel::directoryLoaded);
#endif // filesystemwatcher
Expand Down

0 comments on commit 46dddcb

Please sign in to comment.