Новичок
Группа: Новичок
Сообщений: 6
Регистрация: 30.12.2010
Пользователь №: 2313
Спасибо сказали: 0 раз(а)
Репутация: 0
|
Удалил несколько элементов меню /**************************************************************************** ** Meta object code from reading C++ file 'dword.h' ** ** Created: Sun Jan 2 22:04:19 2011 ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/
#include "../DWord/dword.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'dword.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 62 #error "This file was generated using the moc from 4.7.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif
QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_DWord[] = {
// content: 5, // revision 0, // classname 0, 0, // classinfo 6, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount
// slots: signature, parameters, type, tag, flags 7, 6, 6, 6, 0x08, 37, 6, 6, 6, 0x08, 69, 6, 6, 6, 0x08, 105, 6, 6, 6, 0x08, 136, 6, 6, 6, 0x08, 165, 6, 6, 6, 0x08,
0 // eod };
static const char qt_meta_stringdata_DWord[] = { "DWord\0\0on_menu_file_open_triggered()\0" "on_menu_file_open_3_triggered()\0" "on_menu_file_open_other_triggered()\0" "on_menu_file_close_triggered()\0" "on_menu_file_new_triggered()\0" "on_menu_file_exit_triggered()\0" };
const QMetaObject DWord::staticMetaObject = { { &QMainWindow::staticMetaObject, qt_meta_stringdata_DWord, qt_meta_data_DWord, 0 } };
#ifdef Q_NO_DATA_RELOCATION const QMetaObject &DWord::getStaticMetaObject() { return staticMetaObject; } #endif //Q_NO_DATA_RELOCATION
const QMetaObject *DWord::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; }
void *DWord::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_DWord)) return static_cast<void*>(const_cast< DWord*>(this)); return QMainWindow::qt_metacast(_clname); }
int DWord::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_menu_file_open_triggered(); break; case 1: on_menu_file_open_3_triggered(); break; case 2: on_menu_file_open_other_triggered(); break; case 3: on_menu_file_close_triggered(); break; case 4: on_menu_file_new_triggered(); break; case 5: on_menu_file_exit_triggered(); break; default:; } _id -= 6; } return _id; } QT_END_MOC_NAMESPACE
И получил: moc_dword.cpp:83: error: undefined reference to `DWord::on_menu_file_open_3_triggered()' moc_dword.cpp:84: error: undefined reference to `DWord::on_menu_file_open_other_triggered()' :: error: collect2: ld returned 1 exit status Поправил руками: /**************************************************************************** ** Meta object code from reading C++ file 'dword.h' ** ** Created: Sun Jan 2 22:04:19 2011 ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/
#include "../DWord/dword.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'dword.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 62 #error "This file was generated using the moc from 4.7.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif
QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_DWord[] = {
// content: 5, // revision 0, // classname 0, 0, // classinfo 6, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount
// slots: signature, parameters, type, tag, flags 7, 6, 6, 6, 0x08, 37, 6, 6, 6, 0x08, 69, 6, 6, 6, 0x08, 105, 6, 6, 6, 0x08, 136, 6, 6, 6, 0x08, 165, 6, 6, 6, 0x08,
0 // eod };
static const char qt_meta_stringdata_DWord[] = { "DWord\0\0on_menu_file_open_triggered()\0" "on_menu_file_close_triggered()\0" "on_menu_file_new_triggered()\0" "on_menu_file_exit_triggered()\0" };
const QMetaObject DWord::staticMetaObject = { { &QMainWindow::staticMetaObject, qt_meta_stringdata_DWord, qt_meta_data_DWord, 0 } };
#ifdef Q_NO_DATA_RELOCATION const QMetaObject &DWord::getStaticMetaObject() { return staticMetaObject; } #endif //Q_NO_DATA_RELOCATION
const QMetaObject *DWord::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; }
void *DWord::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_DWord)) return static_cast<void*>(const_cast< DWord*>(this)); return QMainWindow::qt_metacast(_clname); }
int DWord::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_menu_file_open_triggered(); break; case 1: on_menu_file_close_triggered(); break; case 2: on_menu_file_new_triggered(); break; case 3: on_menu_file_exit_triggered(); break; default:; } _id -= 4; } return _id; } QT_END_MOC_NAMESPACE
И получил: Object::connect: No such slot DWord::on_menu_file_new_triggered() in ../DWord/dword.cpp:13 Object::connect: (receiver name: 'DWord') В итоге остальные пункты меню тоже не работают Сделал так: Удалил case 1: on_menu_file_open_3_triggered(); break; case 2: on_menu_file_open_other_triggered(); break; /**************************************************************************** ** Meta object code from reading C++ file 'dword.h' ** ** Created: Sun Jan 2 22:16:49 2011 ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/
#include "../DWord/dword.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'dword.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 62 #error "This file was generated using the moc from 4.7.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif
QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_DWord[] = {
// content: 5, // revision 0, // classname 0, 0, // classinfo 6, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount
// slots: signature, parameters, type, tag, flags 7, 6, 6, 6, 0x08, 37, 6, 6, 6, 0x08, 69, 6, 6, 6, 0x08, 105, 6, 6, 6, 0x08, 136, 6, 6, 6, 0x08, 165, 6, 6, 6, 0x08,
0 // eod };
static const char qt_meta_stringdata_DWord[] = { "DWord\0\0on_menu_file_open_triggered()\0" "on_menu_file_open_3_triggered()\0" "on_menu_file_open_other_triggered()\0" "on_menu_file_close_triggered()\0" "on_menu_file_new_triggered()\0" "on_menu_file_exit_triggered()\0" };
const QMetaObject DWord::staticMetaObject = { { &QMainWindow::staticMetaObject, qt_meta_stringdata_DWord, qt_meta_data_DWord, 0 } };
#ifdef Q_NO_DATA_RELOCATION const QMetaObject &DWord::getStaticMetaObject() { return staticMetaObject; } #endif //Q_NO_DATA_RELOCATION
const QMetaObject *DWord::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; }
void *DWord::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_DWord)) return static_cast<void*>(const_cast< DWord*>(this)); return QMainWindow::qt_metacast(_clname); }
int DWord::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_menu_file_open_triggered(); break; case 3: on_menu_file_close_triggered(); break; case 4: on_menu_file_new_triggered(); break; case 5: on_menu_file_exit_triggered(); break; default:; } _id -= 6; } return _id; } QT_END_MOC_NAMESPACE
Ура проек компилится и работает НО вот это как убрать: QMetaObject::connectSlotsByName: No matching signal for on_menu_file_open_3_triggered() QMetaObject::connectSlotsByName: No matching signal for on_menu_file_open_other_triggered()[expand][/expand] П.С.: 1. Очистить все || Очистить проэкт не помогло 2. Может надо тут что-то грохнуть? // slots: signature, parameters, type, tag, flags 7, 6, 6, 6, 0x08, 37, 6, 6, 6, 0x08, 69, 6, 6, 6, 0x08, 105, 6, 6, 6, 0x08, 136, 6, 6, 6, 0x08, 165, 6, 6, 6, 0x08, ИЗВИНИТЕ ПРОБЛЕМУ РЕШИЛ ТЕМУ МОЖНО УДАЛИТЬ
|