Remove extra ";"s

Making pedantic compilers (more) happy again
parent be0be073
......@@ -31,7 +31,7 @@
#include <QTest>
QTEST_MAIN(KDevelop::TestIVariableController);
QTEST_MAIN(KDevelop::TestIVariableController)
using namespace KDevelop;
......
......@@ -41,7 +41,7 @@ ISourceFormatter::~ISourceFormatter()
SourceFormatterStyle::SourceFormatterStyle()
{
};
}
SourceFormatterStyle::SourceFormatterStyle(const QString &name)
: m_usePreview(false)
......
......@@ -128,7 +128,7 @@ inline uint qHash(const DocumentParseTarget& target)
{
return target.features * 7 + target.priority * 13 + target.sequentialProcessingFlags * 17
+ reinterpret_cast<size_t>(target.notifyWhenReady.data());
};
}
struct DocumentParsePlan
{
......
......@@ -106,6 +106,6 @@ namespace KDevelop {
};
}
Q_DECLARE_METATYPE(KDevelop::CodeCompletionContext::Ptr);
Q_DECLARE_METATYPE(KDevelop::CodeCompletionContext::Ptr)
#endif
......@@ -145,6 +145,6 @@ typedef QExplicitlySharedDataPointer<CompletionTreeElement> CompletionTreeElemen
}
Q_DECLARE_METATYPE(KDevelop::CompletionTreeElementPointer);
Q_DECLARE_METATYPE(KDevelop::CompletionTreeElementPointer)
#endif
......@@ -28,7 +28,7 @@
#include <tests/testfile.h>
#include <QTest>
QTEST_GUILESS_MAIN(TestDocumentchangeset);
QTEST_GUILESS_MAIN(TestDocumentchangeset)
using namespace KDevelop;
......
......@@ -109,7 +109,7 @@ TopDUContext* DUChainBase::topContext() const
namespace {
QMutex weakPointerMutex;
};
}
const QExplicitlySharedDataPointer<DUChainPointerData>& DUChainBase::weakPointer() const
{
......
......@@ -65,7 +65,7 @@ inline void insertData(QStringHash& hash, const InputData& data)
}
}
QTEST_GUILESS_MAIN(BenchHashes);
QTEST_GUILESS_MAIN(BenchHashes)
using namespace KDevelop;
......
......@@ -29,7 +29,7 @@
#include <utility>
#include <QTest>
QTEST_GUILESS_MAIN(TestIdentifier);
QTEST_GUILESS_MAIN(TestIdentifier)
using namespace KDevelop;
......
......@@ -41,10 +41,10 @@ ListType::ListType(const ListType& rhs)
: KDevelop::StructureType(copyData<ListType>(*rhs.d_func())) { }
MapType::MapType()
: ListType(createData<MapType>()) { };
: ListType(createData<MapType>()) { }
MapType::MapType(ListTypeData& data)
: ListType(data) { };
: ListType(data) { }
MapType::MapType(const MapType& rhs)
: ListType(copyData<MapType>(*rhs.d_func())) { }
......
......@@ -84,6 +84,6 @@ public:
} // namespace KDevelop
Q_DECLARE_METATYPE(KDevelop::IFilterStrategy*)
Q_DECLARE_METATYPE(KDevelop::IFilterStrategy::Progress);
Q_DECLARE_METATYPE(KDevelop::IFilterStrategy::Progress)
#endif // KDEVPLATFORM_IFILTERSTRATEGY_H
......@@ -252,6 +252,6 @@ private:
} // namespace KDevelop
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::OutputExecuteJob::JobProperties);
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::OutputExecuteJob::JobProperties)
#endif // KDEVPLATFORM_OUTPUTEXECUTEJOB_H
......@@ -177,7 +177,7 @@ private:
QThread m_thread;
};
Q_GLOBAL_STATIC(ParsingThread, s_parsingThread);
Q_GLOBAL_STATIC(ParsingThread, s_parsingThread)
class OutputModelPrivate
{
......
......@@ -784,7 +784,7 @@ public:
QHash<QString, QString> fileExtensionToIcon;
};
Q_GLOBAL_STATIC(IconNameCache, s_cache);
Q_GLOBAL_STATIC(IconNameCache, s_cache)
QString ProjectFileItem::iconName() const
{
......
......@@ -27,7 +27,7 @@
#include <algorithm>
#include <QTest>
QTEST_GUILESS_MAIN(BenchItemRepository);
QTEST_GUILESS_MAIN(BenchItemRepository)
using namespace KDevelop;
......
......@@ -28,7 +28,7 @@
#include <utility>
QTEST_GUILESS_MAIN(TestIndexedString);
QTEST_GUILESS_MAIN(TestIndexedString)
using namespace KDevelop;
......
......@@ -94,7 +94,7 @@ EditorConfigPage::EditorConfigPage(QWidget* parent)
setObjectName(QStringLiteral("editorconfig"));
}
EditorConfigPage::~EditorConfigPage() {};
EditorConfigPage::~EditorConfigPage() {}
QString EditorConfigPage::name() const
{
......
......@@ -46,7 +46,7 @@ namespace {
KPluginMetaData pluginInfo(KDevelop::IPlugin* plugin)
{
return KDevelop::Core::self()->pluginControllerInternal()->pluginInfo(plugin);
};
}
QString displayName(KDevelop::IPlugin* plugin)
{
......
......@@ -61,7 +61,7 @@ namespace KDevelop
namespace {
int argc = 0;
char** argv = nullptr;
};
}
void SessionController::setArguments(int _argc, char** _argv)
{
......
......@@ -194,4 +194,4 @@ void TestDocumentController::testEmptyUrl()
QVERIFY(!DocumentController::isEmptyDocumentUrl(QUrl::fromLocalFile(QStringLiteral("/test"))));
}
QTEST_MAIN(TestDocumentController);
QTEST_MAIN(TestDocumentController)
......@@ -193,6 +193,6 @@ void TestKTextEditorPluginIntegration::testPluginUnload()
plugin->unload();
}
QTEST_MAIN(TestKTextEditorPluginIntegration);
QTEST_MAIN(TestKTextEditorPluginIntegration)
#include <test_ktexteditorpluginintegration.moc>
\ No newline at end of file
......@@ -40,8 +40,8 @@ enum ActionFlag {
DoUpdate = 1,
DoEmit = 2
};
Q_DECLARE_FLAGS(ActionFlags, ActionFlag);
Q_DECLARE_OPERATORS_FOR_FLAGS(ActionFlags);
Q_DECLARE_FLAGS(ActionFlags, ActionFlag)
Q_DECLARE_OPERATORS_FOR_FLAGS(ActionFlags)
class WatchedDocumentSetPrivate : public QObject
{
......
......@@ -447,7 +447,7 @@ KSelectionProxyModel::FilterBehavior toSelectionProxyModelFilterBehavior(MultiLe
return KSelectionProxyModel::ChildrenOfExactSelection;
}
Q_UNREACHABLE();
};
}
void MultiLevelListView::setLastLevelViewMode(LastLevelViewMode mode)
{
......
......@@ -26,7 +26,7 @@
#include <QTest>
#include <QProcessEnvironment>
QTEST_MAIN(TestEnvironment);
QTEST_MAIN(TestEnvironment)
using ProcEnv = QMap<QString,QString>;
......
......@@ -26,7 +26,7 @@
#include <util/executecompositejob.h>
QTEST_MAIN(TestExecuteCompositeJob);
QTEST_MAIN(TestExecuteCompositeJob)
using namespace KDevelop;
......
......@@ -25,7 +25,7 @@
#include <QTest>
QTEST_MAIN(TestObjectList);
QTEST_MAIN(TestObjectList)
using namespace KDevelop;
......
......@@ -28,7 +28,7 @@
#include <QTest>
QTEST_MAIN(TestPath);
QTEST_MAIN(TestPath)
using namespace KDevelop;
......
......@@ -25,7 +25,7 @@
#include <QTest>
QTEST_MAIN(TestStringHandler);
QTEST_MAIN(TestStringHandler)
using namespace KDevelop;
......
......@@ -25,7 +25,7 @@
#include <QTest>
QTEST_MAIN(TestKTextEditorHelpers);
QTEST_MAIN(TestKTextEditorHelpers)
using namespace KDevelop;
......
......@@ -84,6 +84,6 @@ namespace WidgetColorizer
* files belonging to projects.
*/
KDEVPLATFORMUTIL_EXPORT bool colorizeByProject();
};
}
}
......@@ -37,7 +37,7 @@ CheckInRepositoryJob::CheckInRepositoryJob(KTextEditor::Document* document)
{
connect(this, &CheckInRepositoryJob::finished, this, &CheckInRepositoryJob::deleteLater);
setCapabilities(Killable);
};
}
CheckInRepositoryJob::~CheckInRepositoryJob() = default;
......
......@@ -139,4 +139,4 @@ void TestModels::testVcsFileChangesModel()
QCOMPARE(model->rowCount(), 2);
}
QTEST_MAIN(TestModels);
QTEST_MAIN(TestModels)
......@@ -145,4 +145,4 @@ void TestVcsAnnotation::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsAnnotation);
QTEST_GUILESS_MAIN(TestVcsAnnotation)
......@@ -170,4 +170,4 @@ void TestVcsAnnotationLine::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsAnnotationLine);
QTEST_GUILESS_MAIN(TestVcsAnnotationLine)
......@@ -126,4 +126,4 @@ void TestVcsDiff::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsDiff);
QTEST_GUILESS_MAIN(TestVcsDiff)
......@@ -142,4 +142,4 @@ void TestVcsEvent::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsEvent);
QTEST_GUILESS_MAIN(TestVcsEvent)
......@@ -142,4 +142,4 @@ void TestVcsItemEvent::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsItemEvent);
QTEST_GUILESS_MAIN(TestVcsItemEvent)
......@@ -219,4 +219,4 @@ void TestVcsLocation::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsLocation);
QTEST_GUILESS_MAIN(TestVcsLocation)
......@@ -135,4 +135,4 @@ void TestVcsRevision::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsRevision);
QTEST_GUILESS_MAIN(TestVcsRevision)
......@@ -110,4 +110,4 @@ void TestVcsStatusInfo::testAssignOperator()
}
}
QTEST_GUILESS_MAIN(TestVcsStatusInfo);
QTEST_GUILESS_MAIN(TestVcsStatusInfo)
......@@ -42,7 +42,7 @@ struct ParserSettings
QVector<QByteArray> toClangAPI() const;
bool operator==(const ParserSettings& rhs) const;
};
Q_DECLARE_METATYPE(ParserSettings);
Q_DECLARE_METATYPE(ParserSettings)
struct CodeCompletionSettings
{
......
......@@ -43,6 +43,6 @@ KDevelop::IndexedTypeIdentifier shortenedTypeIdentifier(const KDevelop::Abstract
QString simplifiedTypeString(const KDevelop::AbstractType::Ptr& type, KDevelop::DUContext* visibilityFrom);
QString makeSignatureString(const KDevelop::Declaration* functionDecl, const Signature& signature, const bool editingDefinition);
};
}
#endif // CODEGENHELPER_H
......@@ -41,7 +41,7 @@ public:
KDevelop::ReferencedTopDUContext context() const;
private:
Q_DISABLE_COPY(ClangPCH);
Q_DISABLE_COPY(ClangPCH)
IncludeFileContexts m_includes;
KDevelop::ReferencedTopDUContext m_context;
......
......@@ -56,6 +56,6 @@ KDEVCLANGPRIVATE_EXPORT QVector< QUrl > getPotentialBuddies(const QUrl &url, boo
* If no source file exists or @p headerPath is not a header an empty sting is returned
*/
KDEVCLANGPRIVATE_EXPORT QString sourceForHeader(const QString& headerPath);
};
}
#endif // DOCUMENTFINDERHELPERS_H
......@@ -50,7 +50,7 @@ KDEVCLANGPRIVATE_EXPORT void unregisterDUChainItems();
KDEVCLANGPRIVATE_EXPORT ParseSessionData::Ptr findParseSessionData(const KDevelop::IndexedString &file, const KDevelop::IndexedString &tufile);
KDEVCLANGPRIVATE_EXPORT QString clangBuiltinIncludePath();
};
}
}
......
......@@ -131,7 +131,7 @@ public:
ClangParsingEnvironment environment() const;
private:
Q_DISABLE_COPY(ParseSession);
Q_DISABLE_COPY(ParseSession)
ParseSessionData::Ptr d;
......
......@@ -34,7 +34,7 @@
#include "codecompletion/model.h"
QTEST_MAIN(BenchCodeCompletion);
QTEST_MAIN(BenchCodeCompletion)
using namespace KDevelop;
......
......@@ -76,4 +76,4 @@ void BenchDUChain::benchDUChainBuilder()
}
}
QTEST_MAIN(BenchDUChain);
QTEST_MAIN(BenchDUChain)
......@@ -34,7 +34,7 @@ class View;
namespace KDevelop
{
class TestProjectController;
};
}
struct DeleteDocument
{
......
......@@ -49,7 +49,7 @@
#include <KConfigGroup>
QTEST_MAIN(TestCodeCompletion);
QTEST_MAIN(TestCodeCompletion)
static const auto NoMacroOrBuiltin = ClangCodeCompletionContext::ContextFilters(
ClangCodeCompletionContext::NoBuiltins | ClangCodeCompletionContext::NoMacros);
......@@ -70,7 +70,7 @@ struct CompletionItems {
QStringList declarationItems; ///< completion items that have associated declarations. Declarations with higher match quality at the top. @sa KTextEditor::CodeCompletionModel::MatchQuality
};
Q_DECLARE_TYPEINFO(CompletionItems, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(CompletionItems);
Q_DECLARE_METATYPE(CompletionItems)
struct CompletionPriorityItem
......@@ -100,7 +100,7 @@ struct CompletionPriorityItems : public CompletionItems
};
Q_DECLARE_TYPEINFO(CompletionPriorityItems, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(CompletionPriorityItems);
Q_DECLARE_METATYPE(CompletionPriorityItems)
namespace {
......@@ -1138,7 +1138,7 @@ struct HintItem
return "HintItem(" + hint.toUtf8() + ", " + (hasDeclaration ? "true" : "false") + ')';
}
};
Q_DECLARE_METATYPE(HintItem);
Q_DECLARE_METATYPE(HintItem)
using HintItemList = QVector<HintItem>;
namespace QTest {
template<>
......
......@@ -61,7 +61,7 @@
#include <QLoggingCategory>
#include <QThread>
QTEST_MAIN(TestDUChain);
QTEST_MAIN(TestDUChain)
using namespace KDevelop;
......
......@@ -33,7 +33,7 @@
using namespace KDevelop;
QTEST_GUILESS_MAIN(TestDUChainUtils);
QTEST_GUILESS_MAIN(TestDUChainUtils)
void TestDUChainUtils::initTestCase()
{
......
......@@ -40,7 +40,7 @@
#include <QTest>
#include <QLoggingCategory>
Q_DECLARE_METATYPE(KDevelop::IProblem::Severity);
Q_DECLARE_METATYPE(KDevelop::IProblem::Severity)
using namespace KDevelop;
......@@ -172,7 +172,7 @@ void TestProblems::testChildDiagnostics()
QCOMPARE(d2->rangeInCurrentRevision(), KTextEditor::Range(1, 5, 1, 8));
}
Q_DECLARE_METATYPE(QVector<ClangFixit>);
Q_DECLARE_METATYPE(QVector<ClangFixit>)
/**
* Provides a list of possible fixits: http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html
......
......@@ -36,7 +36,7 @@
#include <QLoggingCategory>
#include <QTest>
QTEST_MAIN(TestRefactoring);
QTEST_MAIN(TestRefactoring)
using namespace KDevelop;
......
......@@ -167,6 +167,6 @@ namespace ClangUtils
* Returns special attributes (isFinal, isQtSlot, ...) given a @p cursor representing a CXXmethod
*/
KDevelop::ClassFunctionFlags specialAttributes(CXCursor cursor);
};
}
#endif // CLANGUTILS_H
......@@ -71,7 +71,7 @@
#include <language/duchain/duchain.h>
#include <makefileresolver/makefileresolver.h>
Q_DECLARE_METATYPE(KDevelop::IProject*);
Q_DECLARE_METATYPE(KDevelop::IProject*)
using namespace KDevelop;
......
......@@ -83,6 +83,6 @@ typedef QHash<QString, QString> CMakeDefinitions;
typedef QHash<QString, CacheEntry> CacheValues;
Q_DECLARE_METATYPE(QList<Test>)
Q_DECLARE_METATYPE(PropertyType);
Q_DECLARE_METATYPE(PropertyType)
#endif
......@@ -94,6 +94,6 @@ private:
typedef QSharedPointer<ICompiler> CompilerPointer;
Q_DECLARE_METATYPE(CompilerPointer);
Q_DECLARE_METATYPE(CompilerPointer)
#endif // ICOMPILER_H
......@@ -61,7 +61,7 @@ public:
bool parseAmbiguousAsCPP;
};
Q_DECLARE_METATYPE(ParserArguments);
Q_DECLARE_METATYPE(ParserArguments)
Q_DECLARE_TYPEINFO(ParserArguments, Q_MOVABLE_TYPE);
struct ConfigEntry
......
......@@ -220,7 +220,7 @@ static QVector<SourceFormatterStyle> stylesFromLanguagePlugins()
}
return styles;
};
}
KDevelop::SourceFormatterStyle CustomScriptPlugin::predefinedStyle(const QString& name) const
{
......
......@@ -42,7 +42,7 @@
#include <QLineEdit>
class la;
Q_DECLARE_METATYPE(KDevelop::IProject*);
Q_DECLARE_METATYPE(KDevelop::IProject*)
QIcon PlasmoidExecutionConfig::icon() const
{
......
......@@ -41,5 +41,5 @@ void {{ name }}::{{ case }}()
{% endfor %}
QTEST_MAIN({{ name }});
QTEST_MAIN({{ name }})
#include "{{ output_file_header|cut:".h" }}.moc"
\ No newline at end of file
......@@ -39,5 +39,5 @@ void TestName::thirdTestCase()
}
QTEST_MAIN(TestName);
QTEST_MAIN(TestName)
#include "testname.moc"
......@@ -127,4 +127,4 @@ QHash< QString, QUrl > TestGenerationTest::urls (const SourceFileTemplate& file)
}
QTEST_GUILESS_MAIN(TestGenerationTest);
QTEST_GUILESS_MAIN(TestGenerationTest)
......@@ -197,4 +197,4 @@ void FindReplaceTest::testReplace()
}
QTEST_MAIN(FindReplaceTest);
QTEST_MAIN(FindReplaceTest)
......@@ -1898,6 +1898,6 @@ void KDevMI::LLDB::LldbTest::testEnvironmentCd()
QCOMPARE(outputLines, QStringList() << path.toLocalFile());
}
QTEST_MAIN(KDevMI::LLDB::LldbTest);
QTEST_MAIN(KDevMI::LLDB::LldbTest)
#include "test_lldb.moc"
......@@ -30,7 +30,7 @@
#include "../projectfilter.h"
QTEST_GUILESS_MAIN(TestProjectFilter);
QTEST_GUILESS_MAIN(TestProjectFilter)
using namespace KDevelop;
......
......@@ -37,7 +37,7 @@
#include <algorithm>
QTEST_MAIN(TestQMakeFile);
QTEST_MAIN(TestQMakeFile)
typedef QHash<QString, QString> DefineHash;
......
......@@ -39,7 +39,7 @@
#include <KConfigGroup>
#include <KJob>
QTEST_MAIN(TestQMakeProject);
QTEST_MAIN(TestQMakeProject)
using namespace KDevelop;
......
......@@ -31,7 +31,7 @@
#include <QTest>
QTEST_GUILESS_MAIN(TestContexts);
QTEST_GUILESS_MAIN(TestContexts)
using namespace KDevelop;
......
......@@ -38,7 +38,7 @@
#include <QTest>
QTEST_GUILESS_MAIN(TestDeclarations);
QTEST_GUILESS_MAIN(TestDeclarations)
using namespace KDevelop;
......
......@@ -123,7 +123,7 @@ ContextMenuExtension KDevQmlJsPlugin::contextMenuExtension(Context* context, QWi
const QString textFromDoc(const IDocument* doc, const KTextEditor::Range& range) {
return doc->textDocument()->line(range.start().line()).mid(range.start().column(), range.end().column()-range.start().column());
};
}
// Finds how many spaces the given string has at one end.
// direction=+1 -> left end of the string, -1 for right end.
......@@ -175,7 +175,7 @@ const QPair<KTextEditor::Range, KTextEditor::Range> parseProperty(const QString&
KTextEditor::Cursor(position.line(), col_offset - value.size() + spacesAtCorner(value, +1)),
KTextEditor::Cursor(position.line(), col_offset + spacesAtCorner(value, -1))
));
};
}
QWidget* KDevQmlJsPlugin::specialLanguageObjectNavigationWidget(const QUrl& url, const KTextEditor::Cursor& position)