Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65251

uic generates QLatin1String for shortcuts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.10.0
    • Fix Version/s: 5.12.0 Alpha
    • Component/s: Build tools: uic
    • Labels:
      None
    • Commits:
      ff18b02f21a04f7092b58be04be5a40df3ef993b

      Description

      Several projects seem to be suffering from this: shortcuts generate compilation errors. I don't know if this is systematic.

       

      Compiling pgmodeler (https://www.pgmodeler.com.br/):

       

      g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DBUILDNUM=\"20171217\" -DBINDIR=\"/usr/local/bin\" -DPLUGINSDIR=\"/usr/local/lib/pgmodeler/plugins\" -DPRIVATEBINDIR=\"/usr/local/lib/pgmodeler/bin\" -DCONFDIR=\"/usr/local/share/pgmodeler/conf\" -DDOCDIR=\"/usr/local/share/pgmodeler\" -DLANGDIR=\"/usr/local/share/pgmodeler/lang\" -DSAMPLESDIR=\"/usr/local/share/pgmodeler/samples\" -DSCHEMASDIR=\"/usr/local/share/pgmodeler/schemas\" -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../libobjrenderer/src -I../libpgconnector/src -I../libpgmodeler/src -I../libparsers/src -I../libutils/src -isystem /usr/include/libxml2 -isystem /usr/include/qt -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtSvg -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -Imoc -isystem /usr/include/libdrm -Isrc -I/usr/lib/qt/mkspecs/linux-g++ -o obj/mainwindow.o src/mainwindow.cpp
      In file included from src/sqlexecutionwidget.h:28:0,
       from src/mainwindow.cpp:23:
      src/ui_sqlexecutionwidget.h: In member function 'void Ui_SQLExecutionWidget::setupUi(QWidget*)':
      src/ui_sqlexecutionwidget.h:186:56: error: no matching function for call to 'QToolButton::setShortcut(QLatin1String)'
       snippets_tb->setShortcut(QLatin1String("Alt+X"));
       ^
      In file included from /usr/include/qt/QtWidgets/QtWidgets:6:0,
       from src/mainwindow.h:28,
       from src/mainwindow.cpp:19:
      /usr/include/qt/QtWidgets/qabstractbutton.h:87:10: note: candidate: void QAbstractButton::setShortcut(const QKeySequence&)
       void setShortcut(const QKeySequence &key);
       ^~~~~~~~~~~
      /usr/include/qt/QtWidgets/qabstractbutton.h:87:10: note: no known conversion for argument 1 from 'QLatin1String' to 'const QKeySequence&'
      In file included from src/sqlexecutionwidget.h:28:0,
       from src/mainwindow.cpp:23:
      src/ui_sqlexecutionwidget.h:204:54: error: no matching function for call to 'QToolButton::setShortcut(QLatin1String)'
       export_tb->setShortcut(QLatin1String("Alt+X"));
       ^
      In file included from /usr/include/qt/QtWidgets/QtWidgets:6:0,
       from src/mainwindow.h:28,
       from src/mainwindow.cpp:19:
      /usr/include/qt/QtWidgets/qabstractbutton.h:87:10: note: candidate: void QAbstractButton::setShortcut(const QKeySequence&)
       void setShortcut(const QKeySequence &key);
       ^~~~~~~~~~~
      /usr/include/qt/QtWidgets/qabstractbutton.h:87:10: note: no known conversion for argument 1 from 'QLatin1String' to 'const QKeySequence&'
      make: *** [Makefile:8805: obj/mainwindow.o] Error 1
      

       

      It worked correctly until 4 days ago, when this system upgraded to 5.10.

       

      It seems other projects are impacted too: https://github.com/QupZilla/qupzilla/issues/2515

       

      I couldn't find this issue here, so I thought it may be interesting to report.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              jkobus Jarek Kobus
              Reporter:
              marco44 marco44
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes