Цитата(lanz @ 22.3.2015, 23:45)
В файл datamodels.cpp надо добавить #include <QMimeData>
Эта ошибка означает, что класс QMimeData был forward-declared, но не определен. Компилятору нужно знать определение класса чтобы правильно сгенерировать вызов функции-члена.
Ты волшебник. Я вот не научился ещё читать ошибки компилятора.
Даже неудобно тебя просить о помощи ещё раз.
Почти весь проект собрался, но в конце, при компиляции появилась ещё одна ошибка:
[ 78%] Building CXX object CMakeFiles/qxkb.dir/src/moc_xkbconf.cpp.o
In file included from /home/druidcat/src/vim/qxkb/build/src/../../src/defs.h:91:0,
from /home/druidcat/src/vim/qxkb/build/src/../../src/xkbconf.h:21,
from /home/druidcat/src/vim/qxkb/build/src/moc_xkbconf.cpp:9:
/home/druidcat/src/vim/qxkb/build/src/moc_xkbconf.cpp:125:33: ошибка: expected unqualified-id before «int»
QMetaType::Void, QMetaType::Bool, 11,
^
/home/druidcat/src/vim/qxkb/build/src/moc_xkbconf.cpp:125:33: ошибка: expected «}» before «int»
/home/druidcat/src/vim/qxkb/build/src/moc_xkbconf.cpp:125:33: ошибка: expected «,» or «;» before «int»
/home/druidcat/src/vim/qxkb/build/src/moc_xkbconf.cpp:141:1: ошибка: expected declaration before «}» token
};
^
CMakeFiles/qxkb.dir/build.make:281: ошибка выполнения рецепта для цели «CMakeFiles/qxkb.dir/src/moc_xkbconf.cpp.o»
make[2]: *** [CMakeFiles/qxkb.dir/src/moc_xkbconf.cpp.o] Ошибка 1
CMakeFiles/Makefile2:91: ошибка выполнения рецепта для цели «CMakeFiles/qxkb.dir/all»
make[1]: *** [CMakeFiles/qxkb.dir/all] Ошибка 2
Makefile:137: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
Ошибка указывает вот на 125 и 141 строчку в файле moc_xkbconf.cpp:
static const uint qt_meta_data_QXKBconf[] = {
78
79 // content:
80 +-- 9 строк: 7, // revision--------------------------------------------------------------------------------------------------------------------------------
89
90 // signals: name, argc, parameters, tag, flags
91 1, 0, 119, 2, 0x06 /* Public */,
92
93 // slots: name, argc, parameters, tag, flags
94 +-- 20 строк: 3, 0, 120, 2, 0x0a Public ,------------------------------------------------------------------------------------------------------------------
114
115 // signals: parameters
116 QMetaType::Void,
117
118 // slots: parameters
119 QMetaType::Void,
120 QMetaType::Void,
121 QMetaType::Void, QMetaType::QModelIndex, 6,
122 QMetaType::Void,
123 QMetaType::Void, QMetaType::Int, 6,
124 QMetaType::Void, QMetaType::Int, 6,
* 125 QMetaType::Void, QMetaType::Bool, 11,
126 QMetaType::Void,
127 QMetaType::Void,
128 QMetaType::Void,
129 QMetaType::Void,
130 QMetaType::Void,
131 QMetaType::Void,
132 QMetaType::Void, QMetaType::QModelIndex, QMetaType::QModelIndex, 19, 20,
133 QMetaType::Void,
134 QMetaType::Void,
135 QMetaType::Void, QMetaType::Bool, 24,
136 QMetaType::Void, QMetaType::Bool, 24,
137 QMetaType::Void, QMetaType::Int, 27,
138 QMetaType::Void, QMetaType::Int, 29,
139
140 0 // eod
* 141 };
Где может быть ошибка? Я для эксперимента закомментировал все connectы в файле xkbconf.cpp и в форме удалил connect. Все равно ошибка.
Ошибка указывает вот на 125 и 141 строчку в файле moc_xkbconf.cpp:
77 static const uint qt_meta_data_QXKBconf[] = {
78
79 // content:
80 +-- 9 строк: 7, // revision--------------------------------------------------------------------------------------------------------------------------------
89
90 // signals: name, argc, parameters, tag, flags
91 1, 0, 119, 2, 0x06 /* Public */,
92
93 // slots: name, argc, parameters, tag, flags
94 +-- 20 строк: 3, 0, 120, 2, 0x0a Public ,------------------------------------------------------------------------------------------------------------------
114
115 // signals: parameters
116 QMetaType::Void,
117
118 // slots: parameters
119 QMetaType::Void,
120 QMetaType::Void,
121 QMetaType::Void, QMetaType::QModelIndex, 6,
122 QMetaType::Void,
123 QMetaType::Void, QMetaType::Int, 6,
124 QMetaType::Void, QMetaType::Int, 6,
125 QMetaType::Void, QMetaType::Bool, 11,
126 QMetaType::Void,
127 QMetaType::Void,
128 QMetaType::Void,
129 QMetaType::Void,
130 QMetaType::Void,
131 QMetaType::Void,
132 QMetaType::Void, QMetaType::QModelIndex, QMetaType::QModelIndex, 19, 20,
133 QMetaType::Void,
134 QMetaType::Void,
135 QMetaType::Void, QMetaType::Bool, 24,
136 QMetaType::Void, QMetaType::Bool, 24,
137 QMetaType::Void, QMetaType::Int, 27,
138 QMetaType::Void, QMetaType::Int, 29,
139
140 0 // eod
141 };
Блин, в предворительном просмотре красивее смотрелся код.