fix(仅bug修复,无其他影响): issue:wayland下看图无法复制图片

This commit is contained in:
zoujunnan@kylinos.cn 2023-01-03 16:40:40 +08:00
parent e4b8d1fc87
commit 93f613592b
4 changed files with 27 additions and 0 deletions

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
kylin-photo-viewer (1.3.0.3-ok9) yangtze; urgency=medium
* BUG号
* 需求号:无
* 其他改动说明issue【看图】【需求15193】无法复制图片
* 影响域仅bug修复无其他影响
-- zoujunnan <zoujunnan@kylinos.cn> Tue, 03 Jan 2023 18:43:28 +0800
kylin-photo-viewer (1.3.0.3-ok8) yangtze; urgency=medium
* BUG号

View File

@ -16,7 +16,14 @@ Rectangle {
property bool mouseIsDoubleClick: false
signal changeImage(var nextOrBack)
signal doubleSignal()
signal copyShortCuts()
property int signListLength: variables.operateTime
Shortcut {
sequence: StandardKey.Copy
onActivated: {
copyShortCuts()
}
}
Variables {

View File

@ -428,6 +428,7 @@ void ShowImageWidget::copy()
}
QMimeData *data = new QMimeData;
data->setUrls(copyfile);
data->setText(m_imagePath);
QClipboard *clipBoard = QApplication::clipboard();
clipBoard->setMimeData(data);
@ -1116,6 +1117,7 @@ void ShowImageWidget::initQmlObject()
QObject::connect(m_qmlObj, SIGNAL(sendDropImagePath(QVariant)), this, SLOT(getDropImagePath(QVariant)));
QObject::connect(m_qmlObj, SIGNAL(changeImage(QVariant)), this, SLOT(needChangeImage(QVariant)));
QObject::connect(m_qmlObj, SIGNAL(doubleSignal()), this, SIGNAL(doubleEventToMainWid()));
QObject::connect(m_qmlObj, SIGNAL(copyShortCuts()), this, SLOT(copyFromQml()));
//操作方式
connect(InteractiveQml::getInstance(), SIGNAL(operateWayChanged(QVariant)), m_qmlObj,
SLOT(setOperateWay(QVariant)));
@ -1401,6 +1403,12 @@ void ShowImageWidget::qmlAndWidgetConnectMovie(QObject *obj)
connect(obj, SIGNAL(buriedPoint()), this, SLOT(zoomBuriedPoint()));
}
void ShowImageWidget::copyFromQml()
{
m_copyFromQml = true;
this->copy();
}
void ShowImageWidget::zoomBuriedPoint()
{
if (m_timer->isActive()) {

View File

@ -94,6 +94,7 @@ public Q_SLOTS:
void textPaint(QVariant textContent, QVariant startPos, QVariant type);
void blurPaint(QVariant blurRect);
void zoomBuriedPoint();
void copyFromQml();
private:
@ -242,6 +243,8 @@ private:
bool m_hasConnectedNormal = false;
bool m_hasConnectedMovie = false;
bool m_copyFromQml = false;
Q_SIGNALS:
void perRate(QString num, QString path); //改变工具栏的缩小的百分比
void toShowImage(); //告诉主界面需要show和hide的控件