Commit 44202313 authored by Volker Krause's avatar Volker Krause
Browse files

Finish the Qt 6 port and add Qt 6 CI

parent 1f08f0e2
Pipeline #261689 passed with stage
in 4 minutes and 23 seconds
......@@ -5,3 +5,6 @@ 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/windows.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
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows-qt6.yml
......@@ -39,7 +39,7 @@ public:
QString currentTitle() const override
{
uint ucs4 = d->charSelect->currentCodePoint();
char32_t ucs4 = d->charSelect->currentCodePoint();
if (QChar::isPrint(ucs4)) {
return QString::fromUcs4(&ucs4, 1) + QLatin1Char(' ') + formatCodePoint(ucs4);
} else {
......@@ -56,7 +56,7 @@ public:
{
QString c = bm.url().toString(QUrl::PreferLocalFile | QUrl::RemoveScheme);
if (c.startsWith(QLatin1String("U+"))) {
uint uc = c.midRef(2).toUInt(nullptr, 16);
uint uc = QStringView(c).mid(2).toUInt(nullptr, 16);
d->charSelect->setCurrentCodePoint(uc);
}
}
......@@ -102,7 +102,7 @@ KCharSelectDia::KCharSelectDia(QWidget *parent)
charSelect->setCurrentFont(vFont);
charSelect->resize(charSelect->sizeHint());
connect(charSelect, &KCharSelect::currentCodePointChanged, this, &KCharSelectDia::charChanged);
connect(charSelect, SIGNAL(codePointSelected(uint)), SLOT(add(uint)));
connect(charSelect, &KCharSelect::codePointSelected, this, qOverload<char32_t>(&KCharSelectDia::add));
connect(charSelect, &KCharSelect::currentFontChanged, this, &KCharSelectDia::fontSelected);
grid->addWidget(charSelect, 0, 0, 1, 4);
......@@ -194,14 +194,14 @@ void KCharSelectDia::closeEvent(QCloseEvent *event)
KConfigGroup gr = config->group("General");
gr.writeEntry("selectedFont", vFont);
gr.writeEntry("char", vChr);
gr.writeEntry("char", (uint)vChr);
gr.writeEntry("rtl", _rtl);
KXmlGuiWindow::closeEvent(event);
}
//==================================================================
void KCharSelectDia::charChanged(uint _chr)
void KCharSelectDia::charChanged(char32_t _chr)
{
vChr = _chr;
}
......@@ -215,7 +215,7 @@ void KCharSelectDia::fontSelected(const QFont &_font)
}
//==================================================================
void KCharSelectDia::add(uint _chr)
void KCharSelectDia::add(char32_t _chr)
{
charChanged(_chr);
......
......@@ -34,18 +34,18 @@ protected:
QLineEdit *lined;
QPushButton *bClip;
uint vChr;
char32_t vChr;
QFont vFont;
bool _rtl;
protected Q_SLOTS:
void charChanged(uint _chr);
void charChanged(char32_t _chr);
void fontSelected(const QFont &_font);
void add()
{
add(vChr);
}
void add(uint _chr);
void add(char32_t _chr);
void toClip();
void toClipUTF8();
void toClipHTML();
......
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