Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
luav opened this issue Jan 13, 2022 · 2 comments
Open

Comments

@luav
Copy link

luav commented Jan 13, 2022

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:

...
@JonisK
Copy link

JonisK commented May 2, 2022

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

@ghost
Copy link

ghost commented Nov 15, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants