Commit d7731574 authored by Laurent Montel's avatar Laurent Montel
Browse files

Fix some compile error against qt6

parent d05c8dd3
Pipeline #204259 passed with stage
in 3 minutes and 10 seconds
......@@ -21,10 +21,10 @@
#include <QFileInfo>
#include <QObject>
#include <QStringList>
class QAction;
class QMenu;
class QStringList;
namespace Cervisia
{
......
......@@ -22,9 +22,8 @@
#define ADDREMOVEDIALOG_H
#include <QDialog>
#include <QStringList>
class QListWidget;
class QStringList;
class AddRemoveDialog : public QDialog
{
......
......@@ -147,7 +147,7 @@ void LogListView::mousePressEvent(QMouseEvent *e)
emit revisionClicked(revision, true);
else
emit revisionClicked(revision, false);
} else if (e->button() == Qt::MidButton)
} else if (e->button() == Qt::MiddleButton)
emit revisionClicked(revision, true);
}
......
......@@ -144,7 +144,11 @@ void LogPlainView::searchHighlight(const QString &text, int index, int length)
setTextCursor(cursor);
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void LogPlainView::setSource(const QUrl &url)
#else
void LogPlainView::doSetSource(const QUrl &url, QTextDocument::ResourceType type)
#endif
{
const QString name(url.toString());
if (name.isEmpty())
......
......@@ -51,7 +51,11 @@ public slots:
void searchHighlight(const QString &text, int index, int length);
protected:
void setSource(const QUrl &url) override;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void setSource(const QUrl &name) override;
#else
void doSetSource(const QUrl &name, QTextDocument::ResourceType type) override;
#endif
private:
KFind *m_find;
......
......@@ -394,7 +394,7 @@ void LogTreeView::mousePressed(const QModelIndex &index)
{
Qt::MouseButtons buttons = QApplication::mouseButtons();
if (buttons == Qt::MidButton || buttons == Qt::LeftButton) {
if (buttons == Qt::MiddleButton || buttons == Qt::LeftButton) {
int row = index.row();
int col = index.column();
......@@ -402,7 +402,7 @@ void LogTreeView::mousePressed(const QModelIndex &index)
if (item->row == row && item->col == col) {
// Change selection for revision B if the middle mouse button or
// the left mouse button with the control key was pressed
bool changeRevB = (buttons == Qt::MidButton) || (buttons == Qt::LeftButton && QApplication::keyboardModifiers() & Qt::ControlModifier);
bool changeRevB = (buttons == Qt::MiddleButton) || (buttons == Qt::LeftButton && QApplication::keyboardModifiers() & Qt::ControlModifier);
emit revisionClicked(item->m_logInfo.m_revision, changeRevB);
viewport()->update();
......
......@@ -156,7 +156,7 @@ QtTableView::QtTableView(QWidget *parent, const char *name)
coveringCornerSquare = false;
inSbUpdate = false;
setAttribute(Qt::WA_NoBackground, true);
setAttribute(Qt::WA_OpaquePaintEvent, true);
setObjectName(name);
}
......
......@@ -20,7 +20,7 @@
#ifndef REPOSITORIES_H
#define REPOSITORIES_H
class QStringList;
#include <QStringList>
class Repositories
{
......
Supports Markdown
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