CuteMarkEd icon indicating copy to clipboard operation
CuteMarkEd copied to clipboard

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

Open luav opened this issue 3 years ago • 2 comments

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:

...

luav avatar Jan 13 '22 01:01 luav

I get a similar error message when building on Ubuntu 21.10 with make:

g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -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 -I/usr/include/hunspell -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebKit -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/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 | formation(this, tr("Conflict"), tr("This 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 |         font.setBold(ks != actions[row]->property("defaultshortcut").value<QKeySequence>());
      |                                                                                        ^
optionsdialog.cpp:237:90: error: expected primary-expression before ‘)’ token
  237 |         font.setBold(ks != 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:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QAction’
   68 | class QAction;
      |       ^~~~~~~
optionsdialog.cpp:256:99: error: expected primary-expression before ‘>’ token
  256 |         const QKeySequence &defaultKeySeq = action->property("defaultshortcut").value<QKeySequence>();
      |                                                                                                   ^
optionsdialog.cpp:256:101: error: expected primary-expression before ‘)’ token
  256 |         const QKeySequence &defaultKeySeq = action->property("defaultshortcut").value<QKeySequence>();
      |                                                                                                     ^
optionsdialog.cpp:257:19: error: invalid use of incomplete type ‘class QAction’
  257 |         if (action->shortcut() != defaultKeySeq) {
      |                   ^~
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:262:66: error: invalid use of incomplete type ‘class QAction’
  262 |         QTableWidgetItem *accel = new KeySequenceTableItem(action->shortcut());
      |                                                                  ^~
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: In member function ‘void OptionsDialog::readState()’:
optionsdialog.cpp:323:50: error: invalid use of incomplete type ‘class QAction’
  323 |         if (options->hasCustomShortcut(actions[i]->objectName())) {
      |                                                  ^~
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:324:101: error: invalid use of incomplete type ‘class QAction’
  324 |       ui->shortcutsTable->item(i, 1)->setData(Qt::EditRole, options->customShortcut(actions[i]->objectName()));
      |                                                                                               ^~

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: In member function ‘void OptionsDialog::saveState()’:
optionsdialog.cpp:370:46: error: invalid use of incomplete type ‘class QAction’
  370 |         options->addCustomShortcut(actions[i]->objectName(), customKeySeq);
      |                                              ^~
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;
      |       ^~~~~~~
make[1]: *** [Makefile:932: optionsdialog.o] Error 1
make[1]: Leaving directory '/home/user/git/CuteMarkEd/app'
make: *** [Makefile:128: sub-app-make_first] Error 2

JonisK avatar May 02 '22 15:05 JonisK

Hello everybody, I know I am a bit late to the party but PR #383 would solve this one. As I don't know if this project will see any commits from the main devs you might be better off cloning my fork.

I really start to like this editor. It's really fast and the live preview does it for me. Excellent work but a pity development seems to be ceased.

ghost avatar Nov 15 '22 22:11 ghost