Bug 358520 - Completion offers to implement std::set<QByteArray> * qgpu_features(const QString&)
Summary: Completion offers to implement std::set<QByteArray> * qgpu_features(const QSt...
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 4.90.91
Platform: Compiled Sources Linux
: LO normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-25 07:34 UTC by David Faure
Modified: 2016-12-12 23:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Faure 2016-01-25 07:34:56 UTC
At the top of kio/autotests/clipboardupdatertest.cpp (probably doesn't matter), type 

class FooPrivate
{
    void foo();
};
then request completion, it will offer
* implement std::set<QByteArray> * qgpu_features(const QString&)  (WTF?)
* implement void FooPrivate::foo() [as expected]

Reproducible: Always



Expected Results:  
it shouldn't offer me to implement random stuff from Qt.
Comment 1 Kevin Funk 2016-12-12 23:53:35 UTC
Still the case, interesting.
Comment 2 Kevin Funk 2016-12-12 23:55:31 UTC
Coming from QTEST_MAIN macro, fwiw:

#define QTEST_MAIN(TestObject) \
QT_BEGIN_NAMESPACE \
QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS \
  ...

#ifndef QT_NO_OPENGL
#  define QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS \
    extern Q_TESTLIB_EXPORT std::set<QByteArray> *(*qgpu_features_ptr)(const QString &); \
    extern Q_GUI_EXPORT std::set<QByteArray> *qgpu_features(const QString &);
  ...
Comment 3 Kevin Funk 2016-12-12 23:57:43 UTC
Reducing priority a bit.

Difficult to handle: the declaration (but not definition) of that function indeed happens inside the .cpp, so the suggestion is not necessarily wrong.