[Differential] [Changed Subscribers] D4359: Add ClangClassHelper, to restore features of CppClassHelper

Gleb Popov noreply at phabricator.kde.org
Tue Jan 31 08:08:20 UTC 2017


arrowdodger added inline comments.

INLINE COMMENTS

> clangclasshelper.cpp:45
> +
> +TemplateClassGenerator* ClangClassHelper::createGenerator(const QUrl& baseUrl)
> +{

`const`?

> clangclasshelper.cpp:52
> +{
> +    QTemporaryFile file(QDir::tempPath() + QLatin1String("/class_XXXXXX.cpp"));
> +    file.setAutoRemove(false);

While `QTemporaryFile` guarantees that the file name will be unique, how about using `name` parameter in it? Something like `QLatin1String("/") + name + QLatin1String("class_XXXXXX.cpp")`. That might ease debugging in some cases.

> clangclasshelper.cpp:53
> +    QTemporaryFile file(QDir::tempPath() + QLatin1String("/class_XXXXXX.cpp"));
> +    file.setAutoRemove(false);
> +    file.open();

Why do we need it?

> clangclasshelper.cpp:94
> +
> +QVariantHash ClangTemplateNewClass::extraVariables()
> +{

This looks `const` too.

> clangclasshelper.h:5
> + * Copyright 2008 Hamish Rodda <rodda at kde.org>
> + * Copyright 2012 Miha Čančula <miha at noughmad.eu>
> + *

Proper copyrights.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D4359

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kossebau, #kdevelop
Cc: arrowdodger, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170131/b186403b/attachment.html>


More information about the KDevelop-devel mailing list