FreeBSD Bugzilla – Attachment 210273 Details for
Bug 242932
x11-toolkits/qt5-gui: QClipboard sometimes fails to paste the image
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
testcase.shar
clipboard-image-testcase.shar (text/plain), 1.64 KB, created by
Yuri Victorovich
on 2019-12-28 03:32:25 UTC
(
hide
)
Description:
testcase.shar
Filename:
MIME Type:
Creator:
Yuri Victorovich
Created:
2019-12-28 03:32:25 UTC
Size:
1.64 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># clipboard-image-testcase ># clipboard-image-testcase/main.cpp ># clipboard-image-testcase/mk.sh ># >echo c - clipboard-image-testcase >mkdir -p clipboard-image-testcase > /dev/null 2>&1 >echo x - clipboard-image-testcase/main.cpp >sed 's/^X//' >clipboard-image-testcase/main.cpp << 'e45cbed5d3bd5fc2861c06daa77e496d' >X >X#include <QApplication> >X#include <QClipboard> >X#include <QMimeData> >X#include <QPixmap> >X#include <QDebug> >X >X >Xint main(int argc, char *argv[]) { >X QGuiApplication app(argc, argv); >X >X const QClipboard *clipboard = QApplication::clipboard(); >X const QMimeData *mimeData = clipboard->mimeData(); >X >X if (mimeData->hasImage()) { >X qDebug() << "has image: mime=" << mimeData->formats().join(", "); >X auto pixmap = qvariant_cast<QPixmap>(mimeData->imageData()); >X if (pixmap.height() != 0) >X qDebug() << "Valid: size=" << pixmap.width() << "x" << pixmap.height(); >X else >X qDebug() << "INVALID! height=0!"; >X } else { >X qDebug() << "NO IMAGE!"; >X } >X} >e45cbed5d3bd5fc2861c06daa77e496d >echo x - clipboard-image-testcase/mk.sh >sed 's/^X//' >clipboard-image-testcase/mk.sh << '397fab879eee1b7a851050a7ebb1f0c9' >Xc++ -fPIC -o test main.cpp \ >X -I /usr/local/include/qt5 \ >X -I /usr/local/include/qt5/QtCore \ >X -I /usr/local/include/qt5/QtWidgets \ >X -I /usr/local/include/qt5/QtGui \ >X -L /usr/local/lib/qt5 \ >X -lQt5Core \ >X -lQt5Widgets \ >X -lQt5Gui >397fab879eee1b7a851050a7ebb1f0c9 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 242932
: 210273