From 50950f48802b4b1d2957b0978921cb407765e7f6 Mon Sep 17 00:00:00 2001 From: Skycoder42 Date: Tue, 13 Feb 2018 12:18:41 +0100 Subject: [PATCH] fix ci missing includes and const ref --- src/mvvmcore/message.cpp | 32 ++++++++++++++++---------------- src/mvvmcore/message.h | 36 ++++++++++++++++++------------------ src/mvvmcore/message_p.h | 4 ++++ 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/mvvmcore/message.cpp b/src/mvvmcore/message.cpp index 055a257..e39f0a3 100644 --- a/src/mvvmcore/message.cpp +++ b/src/mvvmcore/message.cpp @@ -267,7 +267,7 @@ MessageResult *QtMvvm::information(const QString &title, const QString &text, co return CoreApp::showDialog(config); } -void QtMvvm::information(const QString &title, const QString &text, QObject *scope, std::function onResult, const QString &okText) +void QtMvvm::information(const QString &title, const QString &text, QObject *scope, const std::function &onResult, const QString &okText) { auto result = information(title, text, okText); if(result) { @@ -277,7 +277,7 @@ void QtMvvm::information(const QString &title, const QString &text, QObject *sco } } -void QtMvvm::information(const QString &title, const QString &text, std::function onResult, const QString &okText) +void QtMvvm::information(const QString &title, const QString &text, const std::function &onResult, const QString &okText) { information(title, text, CoreApp::instance(), onResult, okText); } @@ -294,7 +294,7 @@ MessageResult *QtMvvm::question(const QString &title, const QString &text, const return CoreApp::showDialog(config); } -void QtMvvm::question(const QString &title, const QString &text, QObject *scope, std::function onResult, const QString &yesText, const QString &noText) +void QtMvvm::question(const QString &title, const QString &text, QObject *scope, const std::function &onResult, const QString &yesText, const QString &noText) { auto result = question(title, text, yesText, noText); if(result) { @@ -305,7 +305,7 @@ void QtMvvm::question(const QString &title, const QString &text, QObject *scope, } } -void QtMvvm::question(const QString &title, const QString &text, std::function onResult, const QString &yesText, const QString &noText) +void QtMvvm::question(const QString &title, const QString &text, const std::function &onResult, const QString &yesText, const QString &noText) { question(title, text, CoreApp::instance(), onResult, yesText, noText); } @@ -320,7 +320,7 @@ MessageResult *QtMvvm::warning(const QString &title, const QString &text, const return CoreApp::showDialog(config); } -void QtMvvm::warning(const QString &title, const QString &text, QObject *scope, std::function onResult, const QString &okText) +void QtMvvm::warning(const QString &title, const QString &text, QObject *scope, const std::function &onResult, const QString &okText) { auto result = warning(title, text, okText); if(result) { @@ -330,7 +330,7 @@ void QtMvvm::warning(const QString &title, const QString &text, QObject *scope, } } -void QtMvvm::warning(const QString &title, const QString &text, std::function onResult, const QString &okText) +void QtMvvm::warning(const QString &title, const QString &text, const std::function &onResult, const QString &okText) { warning(title, text, CoreApp::instance(), onResult, okText); } @@ -345,7 +345,7 @@ MessageResult *QtMvvm::critical(const QString &title, const QString &text, const return CoreApp::showDialog(config); } -void QtMvvm::critical(const QString &title, const QString &text, QObject *scope, std::function onResult, const QString &okText) +void QtMvvm::critical(const QString &title, const QString &text, QObject *scope, const std::function &onResult, const QString &okText) { auto result = critical(title, text, okText); if(result) { @@ -355,7 +355,7 @@ void QtMvvm::critical(const QString &title, const QString &text, QObject *scope, } } -void QtMvvm::critical(const QString &title, const QString &text, std::function onResult, const QString &okText) +void QtMvvm::critical(const QString &title, const QString &text, const std::function &onResult, const QString &okText) { critical(title, text, CoreApp::instance(), onResult, okText); } @@ -444,7 +444,7 @@ MessageResult *QtMvvm::getInput(const QString &title, const QString &text, const return CoreApp::showDialog(config); } -void QtMvvm::getInput(const QString &title, const QString &text, const char *inputType, QObject *scope, std::function onResult, const QVariant &defaultValue, const QVariantMap &viewProperties, const QString &okText, const QString &cancelText) +void QtMvvm::getInput(const QString &title, const QString &text, const char *inputType, QObject *scope, const std::function &onResult, const QVariant &defaultValue, const QVariantMap &viewProperties, const QString &okText, const QString &cancelText) { auto result = getInput(title, text, inputType, defaultValue, viewProperties, okText, cancelText); if(result) { @@ -455,7 +455,7 @@ void QtMvvm::getInput(const QString &title, const QString &text, const char *inp } } -void QtMvvm::getInput(const QString &title, const QString &text, const char *inputType, std::function onResult, const QVariant &defaultValue, const QVariantMap &viewProperties, const QString &okText, const QString &cancelText) +void QtMvvm::getInput(const QString &title, const QString &text, const char *inputType, const std::function &onResult, const QVariant &defaultValue, const QVariantMap &viewProperties, const QString &okText, const QString &cancelText) { getInput(title, text, inputType, CoreApp::instance(), onResult, defaultValue, viewProperties, okText, cancelText); } @@ -468,7 +468,7 @@ MessageResult *QtMvvm::getExistingDirectory(const QString &title, const QUrl &di return CoreApp::showDialog(config); } -void QtMvvm::getExistingDirectory(QObject *scope, std::function onResult, const QString &title, const QUrl &dir) +void QtMvvm::getExistingDirectory(QObject *scope, const std::function &onResult, const QString &title, const QUrl &dir) { auto result = getExistingDirectory(title, dir); if(result) { @@ -479,7 +479,7 @@ void QtMvvm::getExistingDirectory(QObject *scope, std::function onR } } -void QtMvvm::getExistingDirectory(std::function onResult, const QString &title, const QUrl &dir) +void QtMvvm::getExistingDirectory(const std::function &onResult, const QString &title, const QUrl &dir) { getExistingDirectory(CoreApp::instance(), onResult, title, dir); } @@ -493,7 +493,7 @@ MessageResult *QtMvvm::getOpenFile(const QString &title, const QStringList &supp return CoreApp::showDialog(config); } -void QtMvvm::getOpenFile(QObject *scope, std::function onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) +void QtMvvm::getOpenFile(QObject *scope, const std::function &onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) { auto result = getOpenFile(title, supportedMimeTypes, dir); if(result) { @@ -504,7 +504,7 @@ void QtMvvm::getOpenFile(QObject *scope, std::function onResult, co } } -void QtMvvm::getOpenFile(std::function onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) +void QtMvvm::getOpenFile(const std::function &onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) { getOpenFile(CoreApp::instance(), onResult, title, supportedMimeTypes, dir); } @@ -543,7 +543,7 @@ MessageResult *QtMvvm::getSaveFile(const QString &title, const QStringList &supp return CoreApp::showDialog(config); } -void QtMvvm::getSaveFile(QObject *scope, std::function onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) +void QtMvvm::getSaveFile(QObject *scope, const std::function &onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) { auto result = getSaveFile(title, supportedMimeTypes, dir); if(result) { @@ -554,7 +554,7 @@ void QtMvvm::getSaveFile(QObject *scope, std::function onResult, co } } -void QtMvvm::getSaveFile(std::function onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) +void QtMvvm::getSaveFile(const std::function &onResult, const QString &title, const QStringList &supportedMimeTypes, const QUrl &dir) { getSaveFile(CoreApp::instance(), onResult, title, supportedMimeTypes, dir); } diff --git a/src/mvvmcore/message.h b/src/mvvmcore/message.h index 3fd3351..b9fb6d2 100644 --- a/src/mvvmcore/message.h +++ b/src/mvvmcore/message.h @@ -151,11 +151,11 @@ Q_MVVMCORE_EXPORT MessageResult *information(const QString &title, Q_MVVMCORE_EXPORT void information(const QString &title, const QString &text, QObject *scope, - std::function onResult, + const std::function &onResult, const QString &okText = {}); Q_MVVMCORE_EXPORT void information(const QString &title, const QString &text, - std::function onResult, + const std::function &onResult, const QString &okText = {}); Q_MVVMCORE_EXPORT MessageResult *question(const QString &title, @@ -165,12 +165,12 @@ Q_MVVMCORE_EXPORT MessageResult *question(const QString &title, Q_MVVMCORE_EXPORT void question(const QString &title, const QString &text, QObject *scope, - std::function onResult, + const std::function &onResult, const QString &yesText = {}, const QString &noText = {}); Q_MVVMCORE_EXPORT void question(const QString &title, const QString &text, - std::function onResult, + const std::function &onResult, const QString &yesText = {}, const QString &noText = {}); @@ -180,11 +180,11 @@ Q_MVVMCORE_EXPORT MessageResult *warning(const QString &title, Q_MVVMCORE_EXPORT void warning(const QString &title, const QString &text, QObject *scope, - std::function onResult, + const std::function &onResult, const QString &okText = {}); Q_MVVMCORE_EXPORT void warning(const QString &title, const QString &text, - std::function onResult, + const std::function &onResult, const QString &okText = {}); Q_MVVMCORE_EXPORT MessageResult *critical(const QString &title, @@ -193,11 +193,11 @@ Q_MVVMCORE_EXPORT MessageResult *critical(const QString &title, Q_MVVMCORE_EXPORT void critical(const QString &title, const QString &text, QObject *scope, - std::function onResult, + const std::function &onResult, const QString &okText = {}); Q_MVVMCORE_EXPORT void critical(const QString &title, const QString &text, - std::function onResult, + const std::function &onResult, const QString &okText = {}); Q_MVVMCORE_EXPORT MessageResult *about(const QString &description, @@ -220,7 +220,7 @@ Q_MVVMCORE_EXPORT void getInput(const QString &title, const QString &text, const char *inputType, QObject *scope, - std::function onResult, + const std::function &onResult, const QVariant &defaultValue = {}, const QVariantMap &viewProperties = {}, const QString &okText = {}, @@ -228,7 +228,7 @@ Q_MVVMCORE_EXPORT void getInput(const QString &title, Q_MVVMCORE_EXPORT void getInput(const QString &title, const QString &text, const char *inputType, - std::function onResult, + const std::function &onResult, const QVariant &defaultValue = {}, const QVariantMap &viewProperties = {}, const QString &okText = {}, @@ -247,7 +247,7 @@ template inline void getInput(const QString &title, const QString &text, QObject *scope, - std::function onResult, + const std::function &onResult, const QVariant &defaultValue = {}, const QVariantMap &viewProperties = {}, const QString &okText = {}, @@ -259,7 +259,7 @@ inline void getInput(const QString &title, template inline void getInput(const QString &title, const QString &text, - std::function onResult, + const std::function &onResult, const QVariant &defaultValue = {}, const QVariantMap &viewProperties = {}, const QString &okText = {}, @@ -272,10 +272,10 @@ inline void getInput(const QString &title, Q_MVVMCORE_EXPORT MessageResult *getExistingDirectory(const QString &title = {}, const QUrl &dir = {}); Q_MVVMCORE_EXPORT void getExistingDirectory(QObject *scope, - std::function onResult, + const std::function &onResult, const QString &title = {}, const QUrl &dir = {}); -Q_MVVMCORE_EXPORT void getExistingDirectory(std::function onResult, +Q_MVVMCORE_EXPORT void getExistingDirectory(const std::function &onResult, const QString &title = {}, const QUrl &dir = {}); @@ -283,11 +283,11 @@ Q_MVVMCORE_EXPORT MessageResult *getOpenFile(const QString &title = {}, const QStringList &supportedMimeTypes = {}, const QUrl &dir = {}); Q_MVVMCORE_EXPORT void getOpenFile(QObject *scope, - std::function onResult, + const std::function &onResult, const QString &title = {}, const QStringList &supportedMimeTypes = {}, const QUrl &dir = {}); -Q_MVVMCORE_EXPORT void getOpenFile(std::function onResult, +Q_MVVMCORE_EXPORT void getOpenFile(const std::function &onResult, const QString &title = {}, const QStringList &supportedMimeTypes = {}, const QUrl &dir = {}); @@ -309,11 +309,11 @@ Q_MVVMCORE_EXPORT MessageResult *getSaveFile(const QString &title = {}, const QStringList &supportedMimeTypes = {}, const QUrl &dir = {}); Q_MVVMCORE_EXPORT void getSaveFile(QObject *scope, - std::function onResult, + const std::function &onResult, const QString &title = {}, const QStringList &supportedMimeTypes = {}, const QUrl &dir = {}); -Q_MVVMCORE_EXPORT void getSaveFile(std::function onResult, +Q_MVVMCORE_EXPORT void getSaveFile(const std::function &onResult, const QString &title = {}, const QStringList &supportedMimeTypes = {}, const QUrl &dir = {}); diff --git a/src/mvvmcore/message_p.h b/src/mvvmcore/message_p.h index 5dc1c56..8de7ca4 100644 --- a/src/mvvmcore/message_p.h +++ b/src/mvvmcore/message_p.h @@ -1,6 +1,10 @@ #ifndef QTMVVM_MESSAGE_P_H #define QTMVVM_MESSAGE_P_H +#include +#include +#include + #include "qtmvvmcore_global.h" #include "message.h"