Use nullptr and default initialize some members

This commit is contained in:
gfgit 2024-01-02 19:43:09 +01:00
parent 5e5fe08b76
commit e50f42c0c4
3 changed files with 5 additions and 5 deletions

View File

@ -39,6 +39,6 @@ protected:
virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
private:
int m_iconSize;
int m_iconSize = 32;
int m_maxTextWidth = 0;
};

View File

@ -31,7 +31,7 @@
struct AppInfo
{
WId windowId;
WId windowId = 0;
QString name;
QPixmap pixmap;
};

View File

@ -51,11 +51,11 @@ int main(int argc, char* argv[])
app.setQuitOnLastWindowClosed(false);
LXQt::LXQtTheme theme = currentTheme();
if (QFile::exists(theme.path() + "/lxqt-app-switcher.qss")) {
app.setStyleSheet("file:///" + theme.path() + "/lxqt-app-switcher.qss");
if (QFile::exists(theme.path() + QLatin1String("/lxqt-app-switcher.qss"))) {
app.setStyleSheet(QLatin1String("file:///%1/lxqt-app-switcher.qss").arg(theme.path()));
}
QWidget hiddenPreviewParent(0, Qt::Tool);
QWidget hiddenPreviewParent(nullptr, Qt::Tool);
AppSwitcher switcher(&hiddenPreviewParent);
return app.exec();