[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 242660] QHashIterator mixes up code completion for key and value
From: Nicolás Alvarez <nicolas.alvarez () gmail ! com>
Date: 2010-11-15 2:12:46
Message-ID: 20101115021246.0E94774622 () immanuel ! kde ! org
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=242660
Nicolás Alvarez <nicolas.alvarez@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|code completion |Language Support: CPP
--- Comment #2 from Nicolás Alvarez <nicolas alvarez gmail com> 2010-11-15 03:12:45 ---
This bug is strangely related to macros.
#include <QString>
#define DECLARE_MY_ITERATOR \
template <class Key, class T> \
class MyIteratorMacro { \
Key key(); \
T value(); \
};
DECLARE_MY_ITERATOR
template <class Key, class T>
class MyIteratorDirect {
Key key();
T value();
};
int bug242660() {
MyIteratorMacro<QString, int> itm;
MyIteratorDirect<QString, int> itd;
itm.key();
itd.key();
}
Moving mouse over the key() calls, the KDevelop tooltip says itm.key() returns
int (wrong), while itd.key() returns QString (correct). And vice-versa for
value().
The only difference between MyIteratorMacro and MyIteratorDirect is that the
former is declared via a macro. The macro expansion (moving mouse over
DECLARE_MY_ITERATOR) looks fine.
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic