Skip to content
Permalink
Browse files

Fix compatibility with Qt 5.9.

  • Loading branch information...
debfx committed Nov 26, 2017
1 parent 55869e8 commit 181ab27eb9f0bd2b6478f0c22684b742d44c4e2f
@@ -157,7 +157,7 @@ set(CMAKE_AUTOMOC ON)

# Debian sets the the build type to None for package builds.
# Make sure we don't enable asserts there.
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_NONE QT_NO_DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:None>:QT_NO_DEBUG>)

find_package(Gcrypt 1.6.0 REQUIRED)

@@ -58,11 +58,11 @@ class SymmetricCipher
return m_backend->process(data, ok);
}

inline bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT {
Q_REQUIRED_RESULT inline bool processInPlace(QByteArray& data) {
return m_backend->processInPlace(data);
}

inline bool processInPlace(QByteArray& data, quint64 rounds) Q_REQUIRED_RESULT {
Q_REQUIRED_RESULT inline bool processInPlace(QByteArray& data, quint64 rounds) {
Q_ASSERT(rounds > 0);
return m_backend->processInPlace(data, rounds);
}
@@ -29,8 +29,8 @@ class SymmetricCipherBackend
virtual bool setIv(const QByteArray& iv) = 0;

virtual QByteArray process(const QByteArray& data, bool* ok) = 0;
virtual bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT = 0;
virtual bool processInPlace(QByteArray& data, quint64 rounds) Q_REQUIRED_RESULT = 0;
Q_REQUIRED_RESULT virtual bool processInPlace(QByteArray& data) = 0;
Q_REQUIRED_RESULT virtual bool processInPlace(QByteArray& data, quint64 rounds) = 0;

virtual bool reset() = 0;
virtual int blockSize() const = 0;
@@ -35,8 +35,8 @@ class SymmetricCipherGcrypt : public SymmetricCipherBackend
bool setIv(const QByteArray& iv);

QByteArray process(const QByteArray& data, bool* ok);
bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT;
bool processInPlace(QByteArray& data, quint64 rounds) Q_REQUIRED_RESULT;
Q_REQUIRED_RESULT bool processInPlace(QByteArray& data);
Q_REQUIRED_RESULT bool processInPlace(QByteArray& data, quint64 rounds);

bool reset();
int blockSize() const;
@@ -29,7 +29,7 @@ class KeePass2RandomStream
bool init(const QByteArray& key);
QByteArray randomBytes(int size, bool* ok);
QByteArray process(const QByteArray& data, bool* ok);
bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT;
Q_REQUIRED_RESULT bool processInPlace(QByteArray& data);
QString errorString() const;

private:
@@ -448,7 +448,7 @@ void ModelTest::data()
QVariant textAlignmentVariant = model->data ( model->index ( 0, 0 ), Qt::TextAlignmentRole );
if ( textAlignmentVariant.isValid() ) {
int alignment = textAlignmentVariant.toInt();
QCOMPARE( alignment, ( alignment & ( Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask ) ) );
QCOMPARE( alignment, ( alignment & static_cast<int>( Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask ) ) );
}

// General Purpose roles that should return a QColor

0 comments on commit 181ab27

Please sign in to comment.
You can’t perform that action at this time.