Commit c419eaa8 authored by Alexander Volkov's avatar Alexander Volkov

Use QFlags::QFlags() ctor instead of nullptr.

parent 05c011ff
...@@ -477,7 +477,7 @@ void PagerModel::moveWindow(int window, double x, double y, int targetItemId, in ...@@ -477,7 +477,7 @@ void PagerModel::moveWindow(int window, double x, double y, int targetItemId, in
dest = QPointF(qMax(dest.x(), qreal(0.0)), qMax(dest.y(), qreal(0.0))); dest = QPointF(qMax(dest.x(), qreal(0.0)), qMax(dest.y(), qreal(0.0)));
// Use _NET_MOVERESIZE_WINDOW rather than plain move, so that the WM knows this is a pager request. // Use _NET_MOVERESIZE_WINDOW rather than plain move, so that the WM knows this is a pager request.
NETRootInfo info(QX11Info::connection(), nullptr); NETRootInfo info(QX11Info::connection(), NET::Properties());
const int flags = (0x20 << 12) | (0x03 << 8) | 1; // From tool, x/y, northwest gravity. const int flags = (0x20 << 12) | (0x03 << 8) | 1; // From tool, x/y, northwest gravity.
if (!KWindowSystem::mapViewport()) { if (!KWindowSystem::mapViewport()) {
...@@ -591,7 +591,7 @@ void PagerModel::drop(QMimeData *mimeData, int itemId) ...@@ -591,7 +591,7 @@ void PagerModel::drop(QMimeData *mimeData, int itemId)
} }
for (const auto &id : ids) { for (const auto &id : ids) {
QStringList activities = KWindowInfo(id, nullptr, NET::WM2Activities).activities(); QStringList activities = KWindowInfo(id, NET::Properties(), NET::WM2Activities).activities();
if (!activities.contains(newActivity)) { if (!activities.contains(newActivity)) {
KWindowSystem::setOnActivities(id, activities << newActivity); KWindowSystem::setOnActivities(id, activities << newActivity);
......
...@@ -443,7 +443,7 @@ void SortedActivitiesModel::onBackgroundsUpdated(const QStringList &activities) ...@@ -443,7 +443,7 @@ void SortedActivitiesModel::onBackgroundsUpdated(const QStringList &activities)
void SortedActivitiesModel::onWindowAdded(WId window) void SortedActivitiesModel::onWindowAdded(WId window)
{ {
KWindowInfo info(window, nullptr, NET::WM2Activities); KWindowInfo info(window, NET::Properties(), NET::WM2Activities);
const QStringList activities = info.activities(); const QStringList activities = info.activities();
if (activities.isEmpty() || activities.contains("00000000-0000-0000-0000-000000000000")) return; if (activities.isEmpty() || activities.contains("00000000-0000-0000-0000-000000000000")) return;
......
...@@ -30,7 +30,7 @@ class FolderSelectionWidget : public QWidget ...@@ -30,7 +30,7 @@ class FolderSelectionWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit FolderSelectionWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); explicit FolderSelectionWidget(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
void setDirectoryList(QStringList includeDirs, QStringList exclude); void setDirectoryList(QStringList includeDirs, QStringList exclude);
QStringList includeFolders() const; QStringList includeFolders() const;
......
...@@ -669,7 +669,7 @@ QFont KFonts::windowTitleFont() const ...@@ -669,7 +669,7 @@ QFont KFonts::windowTitleFont() const
void KFonts::adjustAllFonts() void KFonts::adjustAllFonts()
{ {
QFont font = m_generalFont; QFont font = m_generalFont;
KFontChooser::FontDiffFlags fontDiffFlags = nullptr; KFontChooser::FontDiffFlags fontDiffFlags;
int ret = KFontDialog::getFontDiff(font, fontDiffFlags, KFontChooser::NoDisplayFlags); int ret = KFontDialog::getFontDiff(font, fontDiffFlags, KFontChooser::NoDisplayFlags);
if (ret == KDialog::Accepted && fontDiffFlags) { if (ret == KDialog::Accepted && fontDiffFlags) {
......
...@@ -73,7 +73,7 @@ int LayoutsTableModel::columnCount(const QModelIndex&) const ...@@ -73,7 +73,7 @@ int LayoutsTableModel::columnCount(const QModelIndex&) const
Qt::ItemFlags LayoutsTableModel::flags(const QModelIndex &index) const Qt::ItemFlags LayoutsTableModel::flags(const QModelIndex &index) const
{ {
if (!index.isValid()) if (!index.isValid())
return nullptr; return Qt::ItemFlags();
Qt::ItemFlags flags = QAbstractTableModel::flags(index); Qt::ItemFlags flags = QAbstractTableModel::flags(index);
......
...@@ -151,7 +151,7 @@ public: ...@@ -151,7 +151,7 @@ public:
} }
Qt::ItemFlags flags ( const QModelIndex & index ) const override { Qt::ItemFlags flags ( const QModelIndex & index ) const override {
if( ! index.isValid() ) if( ! index.isValid() )
return nullptr; return Qt::ItemFlags();
if( !index.parent().isValid() ) if( !index.parent().isValid() )
return Qt::ItemIsEnabled | Qt::ItemIsSelectable; return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
......
...@@ -84,7 +84,7 @@ QVariant PredicateModel::data( const QModelIndex &index, int role ) const ...@@ -84,7 +84,7 @@ QVariant PredicateModel::data( const QModelIndex &index, int role ) const
Qt::ItemFlags PredicateModel::flags( const QModelIndex &index ) const Qt::ItemFlags PredicateModel::flags( const QModelIndex &index ) const
{ {
if ( !index.isValid() ) { if ( !index.isValid() ) {
return nullptr; return Qt::ItemFlags();
} }
return Qt::ItemIsEnabled | Qt::ItemIsSelectable; return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment