From 6292e4472160c7e1d15f9c80841d748fe04b8c07 Mon Sep 17 00:00:00 2001 From: liuminghang Date: Thu, 24 Jun 2021 14:28:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20dbus=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=B7=B2=E7=BB=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: dbus和本地代码不一样,合并错误,带名称的打开图像接口 Log: 与dbus有关 Change-Id: Ica50c51011fee5ab39a0c46351da446dcc13ea67 --- src/mainwidget.cpp | 2 +- src/service/ocrinterface.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index 4feee30..afbf6ab 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -287,7 +287,7 @@ void MainWidget::openImage(const QString &path) if (m_imageview) { QImage img(path); m_imgName = path; - openImage(img); + openImage(img, m_imgName); } } diff --git a/src/service/ocrinterface.h b/src/service/ocrinterface.h index 14a0859..5a98256 100644 --- a/src/service/ocrinterface.h +++ b/src/service/ocrinterface.h @@ -88,7 +88,7 @@ public Q_SLOTS: // METHODS * @return: QDBusPendingReply * @note: */ - inline QDBusPendingReply<> openImageAndName(const QImage &image,const QString &imageName) + inline QDBusPendingReply<> openImageAndName(const QImage &image, const QString &imageName) { qDebug() << __FUNCTION__; QByteArray data; @@ -97,7 +97,7 @@ public Q_SLOTS: // METHODS data = qCompress(data, 9); data = data.toBase64(); } - return call(QStringLiteral("openImage"), QVariant::fromValue(data),imageName); + return call(QStringLiteral("openImageAndName"), QVariant::fromValue(data), imageName); } Q_SIGNALS: // SIGNALS