mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-12 17:13:52 +00:00
CLI: fix bug in "--scalexdimdp" in converting from "in" to "mm"
(was dividing instead of multiplying doh); make "--scalexdimdp" units check error messages better; add more "--test" tests & have `validate_units()` etc take `errbuf` arg to make them more test-friendly GUI: `copy_to_clipboard()` unshadow `data` -> `fdata` test suite: make `utf8_to_wide()` same as "backend/output.c" & fix return vals; add `QZint::save_to_memfile()` test
This commit is contained in:
@@ -3588,17 +3588,17 @@ void MainWindow::copy_to_clipboard(const QString &filename, const QString& name,
|
||||
{
|
||||
QClipboard *clipboard = QGuiApplication::clipboard();
|
||||
|
||||
QByteArray data;
|
||||
if (!m_bc.bc.save_to_memfile(filename, data)) {
|
||||
QByteArray fdata;
|
||||
if (!m_bc.bc.save_to_memfile(filename, fdata)) {
|
||||
return;
|
||||
}
|
||||
|
||||
QMimeData *mdata = new QMimeData;
|
||||
if (mimeType) {
|
||||
mdata->setData(mimeType, data);
|
||||
mdata->setData(mimeType, fdata);
|
||||
} else {
|
||||
QImage img;
|
||||
img.loadFromData(data);
|
||||
img.loadFromData(fdata);
|
||||
mdata->setImageData(img);
|
||||
}
|
||||
clipboard->setMimeData(mdata, QClipboard::Clipboard);
|
||||
|
||||
Reference in New Issue
Block a user