Commit c14cfe1c authored by Laurent Montel's avatar Laurent Montel

Don't use nullptr as flags

parent 71905f74
......@@ -495,7 +495,7 @@ Qt::ItemFlags KateFileTreeModel::flags(const QModelIndex &index) const
Qt::ItemFlags flags = Qt::ItemIsEnabled;
if (!index.isValid()) {
return nullptr;
return Qt::NoItemFlags;
}
const ProxyItem *item = static_cast<ProxyItem *>(index.internalPointer());
......
......@@ -67,7 +67,7 @@ public:
Qt::ItemFlags flags(const QModelIndex &index) const override
{
if (!index.isValid()) {
return nullptr;
return Qt::NoItemFlags;
}
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
}
......
......@@ -413,7 +413,7 @@ bool TargetModel::setData(const QModelIndex &index, const QVariant &value, int r
Qt::ItemFlags TargetModel::flags(const QModelIndex &index) const
{
if (!index.isValid()) {
return nullptr;
return Qt::NoItemFlags;
}
if (index.internalId() != InvalidIndex && index.column() == 0) {
......
......@@ -35,7 +35,7 @@ class ConnectionWizard : public QWizard
public:
enum { Page_Driver, Page_Standard_Server, Page_SQLite_Server, Page_Save };
ConnectionWizard(SQLManager *manager, Connection *conn, QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr);
ConnectionWizard(SQLManager *manager, Connection *conn, QWidget *parent = nullptr, Qt::WindowFlags flags = {});
~ConnectionWizard() override;
SQLManager *manager()
......
......@@ -294,7 +294,7 @@ bool KateApp::openUrl(const QUrl &url, const QString &encoding, bool isTempFile)
bool KateApp::isOnActivity(const QString &activity)
{
for (const auto &window : m_mainWindows) {
const KWindowInfo info(window->winId(), nullptr, NET::WM2Activities);
const KWindowInfo info(window->winId(), {}, NET::WM2Activities);
const auto activities = info.activities();
// handle special case of "on all activities"
if (activities.isEmpty() || activities.contains(activity))
......
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