Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow build on Qt6 #6

Open
wants to merge 1 commit into
base: mer-master
Choose a base branch
from
Open

Conversation

neochapay
Copy link

No description provided.

@@ -87,7 +87,11 @@ struct Q_GALLERY_EXPORT QGalleryProperty
return QGalleryMetaDataFilter(QLatin1String(m_name), string, QGalleryFilter::Wildcard); }
QGalleryMetaDataFilter regExp(const QString &rx) const {
return QGalleryMetaDataFilter(QLatin1String(m_name), rx, QGalleryFilter::RegExp); }
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pondering if we should provide QRegularExpression even for Qt5 as it's available there.

@@ -102,7 +102,11 @@ QVariant QGalleryTrackerStringListColumn::toVariant(TrackerSparqlCursor *cursor,
{
switch (TrackerSparqlValueType type = tracker_sparql_cursor_get_value_type(cursor, index)) {
case TRACKER_SPARQL_VALUE_TYPE_STRING:
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the qt5 version with Qt::SkipEmptyParts.

@@ -262,7 +262,11 @@ QModelIndex QDeclarativeGalleryQueryModel::index(int row, int column, const QMod

QJSValue QDeclarativeGalleryQueryModel::get(const QJSValue &index) const
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QJSEngine *scriptEngine = qjsEngine(this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this should be available also on Qt5.


setRoleNames(roleNames);
m_roleNames.insert(ItemId, QByteArray("itemId"));
m_roleNames.insert(ItemType, QByteArray("itemType"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels suspicious just adjusting the content of rolenames without notifying anyone, but seems that's how setRoleNames() is even working. Guess so then.

@@ -371,7 +378,11 @@ void QGalleryTrackerResultSetPrivate::syncFinish(const int rIndex, const int iIn

bool QGalleryTrackerResultSetPrivate::waitForSyncFinish(int msecs)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QTimer timer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think QTimer should work for all Qt versions that matter. Let's just switch to that? Applies on many places.

Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needing some adjustments.

@@ -46,6 +46,7 @@
#include "qgalleryabstractrequest.h"
#include "qgallerytrackerresultset_p.h"
#include "qgallerytrackerlistcolumn_p.h"
#include "qregularexpression.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppose this should be <QRegularExpression>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants