Closed RiseOfDeath closed 10 years ago
Ты точно 3.1.2 собираешь? По ошибкам больше похоже на master ветку. Если да, то там их еще несколько будет :) С 3.2 (да и вообще с 3.1.2+) я совместимость пока не проверял, т.к. версия еще не финальная и может меняться. Буду пересобирать после официального релиза. Но вопросы по ней мне уже задавали, так что на всякий случай выложу мои на них ответы (несколько выдраны из контекста). Ответы на скорую руку + где-то 3-недельной давности, так что может еще что-то неприятное всплыть.
(documentModel not a member...): вместо
EditorManager::documentModel ()
написатьDocumentModel::model()
(DocumentModel has no member...):
DocumentModel::Entry* entry = model->documentAtRow (row);
заменить наDocumentModel::Entry* entry = model->entryAtRow(row);
вместо
DocumentModel* model = EditorManager::documentModel ();
надо написатьQAbstractItemModel* model = EditorManager::documentModel ();
т.к. DocumentModel больше не наследуется от QAbstractItemModel, а содержит указатель на нее.
Ну сейчас, по крайней мере, не ругается ни на что. Осталось по-быстрому все проверить.
И вы правы оказались, это была ветка master. Щас пробую для 3.2 сделать и для 3.1.2.
Вроде бы пашет. Хотя есть один критический баг (ради которого отдельный issue делать не хочу):
cppcheck: there is no --enable parameter with the name 'warning'
У меня Cppcheck 1.52
--enable=
Enable additional checks. The available ids are: * all Enable all checks * style Enable all coding style checks. All messages with the severities 'style', 'performance' and 'portability' are enabled. * performance Enable performance messages * portability Enable portability messages * information Enable information messages * unusedFunction Check for unused functions * missingInclude Warn if there are missing includes. For detailed information, use '--check-config'. Several ids can be given if you separate them with commas.
Т.е. там нет опции warnin, да и как я понял вы просто все опции сразу пихаете, так что можно их заменить на all.
И, к стати, проверил сам плагин самим плагином:
/home/anton/workspace/qtc-cppcheck/src/OptionsPage.cpp:26: предупреждение: Cppcheck: The function 'matches' is never used
Рад, что проблемы решились :)
--enable=all
автоматически включает unusedFunction
, которая, в свою очередь, выключает многопоточный анализ. Для этого и сделана отдельная галочка для "неиспользуемых функций". Так что буду искать какое-то другое решение.
Насчет старого cppcheck.. Исправлю. Скорее всего сделаю возможность замены, а не дополнения параметра enable из пользовательских параметров в настройках.
По поводу matches. У меня cppcheck такого не находит :). А вообще это часть API Creator'а, так что вызовы просто вне зоны видимости плагина.
Пулл реквест прокомментирую отдельно.
Не успешная попытка адаптировать плагин под QtCreator 3.x.x и Qt5.
Что я менял:
paths.pri - согласно моим путям (и убрал обработку виндовых компиляторов, что бы не отвлекала внимание):
Также заменил инклуды согласно The Transition from Qt 4.x to Qt 5 в файлах:
OptionsWidget.h
OptionsWidget.cpp
Других изменений в исходники я не вносил.
В результате при компиляции выдает:
Подозреваю что QtCreator 3.x.x внутри чем-то отличается от более старых версий.