Bug report #19868

copy/paste style doesn't works

Added by Loïc BARTOLETTI over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:Denis Rouzaud
Category:GUI
Affected QGIS version:3.3(master) Regression?:Yes
Operating System:FreeBSD, Windows Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27692

Description

Since https://github.com/qgis/QGIS/pull/7863 copy/paste style doesn't works.
Tested with "All style" or a category selected

qgislog (62.9 KB) Regis Haubourg, 2018-10-18 02:00 PM


Related issues

Duplicates QGIS Application - Bug report #19860: Unable to copy paste style from a layer to another one Closed 2018-09-17
Duplicated by QGIS Application - Bug report #20175: master - Copy style and paste style does not work Closed 2018-10-22
Duplicated by QGIS Application - Bug report #20178: Not possible to paste a style because all "Paste Style" o... Closed 2018-10-22

Associated revisions

Revision 0296c272
Added by Denis Rouzaud over 5 years ago

[fix #19868] fix paste style

Revision daf53940
Added by Denis Rouzaud over 5 years ago

fix Qt issue QVariant::value using enum (#8265)

  • fix Qt issue QVariant::value using enum

see https://bugreports.qt.io/browse/QTBUG-53384
fix #19868

History

#1 Updated by Loïc BARTOLETTI over 5 years ago

  • Assignee set to Denis Rouzaud

#2 Updated by Denis Rouzaud over 5 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#3 Updated by Harrissou Santanna over 5 years ago

  • Duplicates Bug report #19860: Unable to copy paste style from a layer to another one added

#4 Updated by Regis Haubourg over 5 years ago

  • Status changed from Closed to Open

Hi Denis,
I test on ubuntu 16.04 with 46938c0 and whatever datasource I use, copying style (all or sub section) does not work at all.

Paste section remains grayed out, and pasting in a text editor gives:

<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.3.0-Master" styleCategories="">
 <layerGeometryType>2</layerGeometryType>
</qgis>

On windows, with revision 68f4cf2d0f it works well.

Any idea ?

#5 Updated by Denis Rouzaud over 5 years ago

can you check for Qt warnings if you have anything related to metaenum in the log? (not sure if you need to compile using debug mode)

#6 Updated by Regis Haubourg over 5 years ago

Hi,
I am using nighlty builds for ubuntu / ubuntuGIS.
It seems to be built with debug options yes.

Grepping stdout, I have a lot of

QgsDebugMsg( "Invalid metaenum. Enum probably misses Q_ENUM or Q_FLAG declaration." );

errors when loading QGIS, but no message at all when doing the right-click action to copy a style section.

I also see some

.cache/deja-dup/e4abab5309d926dbe451d8e86ee2db80/duplicity-inc.20180920T152616Z.to.20181009T191904Z.manifest:    changed  home/regis/APPS/QGIS3/cpp/QGIS/build-master/output/python/qgis/core/additions/metaenum.py
grep: .cache/dconf: Permission non accordée

I fail to understand if how this is related to QGIS. My .cache/dconf dir is :

drwx------  2 root  root      4096 févr. 24  2018 dconf/

Do I have a local issue?

#7 Updated by Regis Haubourg over 5 years ago

my full log attached

#8 Updated by Denis Rouzaud over 5 years ago

  • Status changed from Open to Feedback

as already discussed, there is no line about missing metaenum here.
can you provide more details?

#9 Updated by Alessandro Sarretta over 5 years ago

As described in #20178 I have the same issue.
Not sure it is related or it can be useful, but I copy here the message in the log messages Qt window, inside QGIS:


2018-10-22T15:48:57     WARNING    void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Search QMS" under id 288
2018-10-22T15:49:05     WARNING    Duplicate shortcut registered: About
2018-10-22T15:49:05     WARNING    QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
...
...
...
2018-10-22T15:49:05     WARNING    QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action

How can I help you with more details?

#10 Updated by Denis Rouzaud over 5 years ago

if you have any line with metaenum written in it it'd be interesting. Feel free to post the whole ouptput on pastebin and I can look.
Thanks

#11 Updated by Denis Rouzaud over 5 years ago

no issue on Fedora.
It might be a Qt issue.
QMetaEnum::fromType is from Qt 5.5.

What is your Qt version?

#12 Updated by Denis Rouzaud over 5 years ago

found the upstream bug
https://bugreports.qt.io/browse/QTBUG-53384
this affects 5.6.0, fixed in 5.6.2....and Ubuntu 16.04 is 5.5

will try to fix this

#14 Updated by Regis Haubourg over 5 years ago

  • Duplicated by Bug report #20175: master - Copy style and paste style does not work added

#15 Updated by Regis Haubourg over 5 years ago

  • Pull Request or Patch supplied changed from No to Yes

PR tested, it works here. Many thanks Denis!

#16 Updated by Denis Rouzaud over 5 years ago

  • Status changed from Feedback to Closed

#17 Updated by Denis Rouzaud over 5 years ago

patch has been merged, please test with next daily build and report if everything is ok!

#18 Updated by Jürgen Fischer over 5 years ago

  • Duplicated by Bug report #20178: Not possible to paste a style because all "Paste Style" options are grayed added

Also available in: Atom PDF