Commit 1eea70e7 authored by Volker Krause's avatar Volker Krause
Browse files

Complete the Qt 6 port and add Qt 6 CI

parent 6dea0727
Pipeline #257774 passed with stage
in 3 minutes and 32 seconds
......@@ -4,3 +4,5 @@
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd-qt6.yml
......@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
// KF
#include <KIO/CopyJob>
#include <KIO/DeleteJob>
#include <KIO/DeleteOrTrashJob>
#include <KIO/Job>
#include <KIO/JobUiDelegate>
#include <KJobWidgets>
......@@ -133,18 +134,13 @@ static void delOrTrash(KIO::JobUiDelegate::DeletionType deletionType, const QLis
{
Q_ASSERT(urlList.count() > 0);
KIO::JobUiDelegate uiDelegate;
uiDelegate.setWindow(parent);
if (!uiDelegate.askDeleteConfirmation(urlList, deletionType, KIO::JobUiDelegate::DefaultConfirmation)) {
return;
}
KIO::Job *job = nullptr;
KJob *job = nullptr;
switch (deletionType) {
case KIO::JobUiDelegate::Trash:
job = KIO::trash(urlList);
job = new KIO::DeleteOrTrashJob(urlList, KIO::AskUserActionInterface::Trash, KIO::AskUserActionInterface::DefaultConfirmation, parent);
break;
case KIO::JobUiDelegate::Delete:
job = KIO::del(urlList);
job = new KIO::DeleteOrTrashJob(urlList, KIO::AskUserActionInterface::Delete, KIO::AskUserActionInterface::DefaultConfirmation, parent);
break;
default: // e.g. EmptyTrash
return;
......
......@@ -203,7 +203,7 @@ struct SaveBarPrivate {
int topRowHeight = q->window()->isFullScreen() ? 0 : mTopRowWidget->height();
int bottomRowHeight = mTooManyChangesFrame->isVisibleTo(mSaveBarWidget) ? mTooManyChangesFrame->sizeHint().height() : 0;
int height = 2 * layout->margin() + topRowHeight + bottomRowHeight;
int height = 2 * layout->contentsMargins().top() + layout->contentsMargins().bottom() + topRowHeight + bottomRowHeight;
if (topRowHeight > 0 && bottomRowHeight > 0) {
height += layout->spacing();
}
......
......@@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <QAction>
#include <QIcon>
#include <QLabel>
#include <QMenu>
#include <QStyle>
#include <QStyleOptionTab>
#include <QToolButton>
......
......@@ -86,8 +86,8 @@ struct AbstractImageViewPrivate {
}
const QSizeF zoomedDocSize = q->dipDocumentSize() * mZoom;
const QSizeF viewSize = q->boundingRect().size();
const QPointF newPos(qBound(qreal(0.), _newPos.x(), zoomedDocSize.width() - viewSize.width()),
qBound(qreal(0.), _newPos.y(), zoomedDocSize.height() - viewSize.height()));
const QPointF newPos(qBound(qreal(0.), _newPos.x(), std::max(0., zoomedDocSize.width() - viewSize.width())),
qBound(qreal(0.), _newPos.y(), std::max(0., zoomedDocSize.height() - viewSize.height())));
if (newPos != mScrollPos) {
const QPointF oldPos = mScrollPos;
mScrollPos = newPos;
......
......@@ -83,11 +83,9 @@ void createEmptyFile(const QString &path)
void waitForDeferredDeletes()
{
while (QCoreApplication::hasPendingEvents()) {
QCoreApplication::sendPostedEvents();
QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
QCoreApplication::processEvents();
}
QCoreApplication::sendPostedEvents();
QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
QCoreApplication::processEvents();
}
namespace TestUtils
......
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