Skip to content

Make install error (invalid use of incomplete type ‘class QAction’) #381

@luav

Description

@luav

qmake and make all are executed successfully, but then

$ sudo make install

fails:

...
make[1]: Entering directory '/opt/repos/CuteMarkEd/app'
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -I../libs/jsonconfig -I../app-static -I../libs -I../3rdparty/peg-markdown-highlight -isystem /usr/include/hunspell -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o optionsdialog.o optionsdialog.cpp
optionsdialog.cpp: In member function ‘void OptionsDialog::validateShortcut(int, int)’:
optionsdialog.cpp:221:46: error: invalid use of incomplete type ‘class QAction’
  221 |             new QTableWidgetItem(actions[row]->shortcut().toString()));
      |                                              ^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from optionsdialog.h:20,
                 from optionsdialog.cpp:17:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QAction’
   68 | class QAction;
      |       ^~~~~~~
optionsdialog.cpp:228:58: error: invalid use of incomplete type ‘class QAction’
  228 |                        new QTableWidgetItem(actions[row]->shortcut().toString()));
      |                                                         ^~

In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from optionsdialog.h:20,
                 from optionsdialog.cpp:17:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QAction’
   68 | class QAction;
      |       ^~~~~~~
optionsdialog.cpp:229:129: error: invalid use of incomplete type ‘class QAction’
  229 | his shortcut is already used for \"%1\"").arg(actions[c]->text().remove('&')));
      |                                                         ^~

In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from optionsdialog.h:20,
                 from optionsdialog.cpp:17:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QAction’
   68 | class QAction;
      |       ^~~~~~~
optionsdialog.cpp:237:40: error: invalid use of incomplete type ‘class QAction’
  237 |         font.setBold(ks != actions[row]->property("defaultshortcut").value<QKeySequence>());
      |                                        ^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from optionsdialog.h:20,
                 from optionsdialog.cpp:17:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QAction’
   68 | class QAction;
      |       ^~~~~~~
optionsdialog.cpp:237:88: error: expected primary-expression before ‘>’ token
  237 | = actions[row]->property("defaultshortcut").value<QKeySequence>());
      |                                                               ^

optionsdialog.cpp:237:90: error: expected primary-expression before ‘)’ token
  237 | = actions[row]->property("defaultshortcut").value<QKeySequence>());
      |                                                                 ^

optionsdialog.cpp: In member function ‘void OptionsDialog::setupShortcutsTable()’:
optionsdialog.cpp:254:62: error: invalid use of incomplete type ‘class QAction’
  254 |    QTableWidgetItem *label = new QTableWidgetItem(action->text().remove('&'));
      |                                                         ^~

In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from optionsdialog.h:20,
                 from optionsdialog.cpp:17:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QAction’
   68 | class QAction;
      |       ^~~~~~~
optionsdialog.cpp:256:51: error: invalid use of incomplete type ‘class QAction’
  256 |         const QKeySequence &defaultKeySeq = action->property("defaultshortcut").value<QKeySequence>();
      |                                                   ^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from optionsdialog.h:20,
                 from optionsdialog.cpp:17:

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions