We need to construct QImageTextKeyLang objects for the deprecated
method in QImage. That's impossible to do if we don't have a
constructor for the class that's non deprecated. So add a private
constructor and make QImage a fried of the class so it can use
that constructor.
Change-Id: I6359e9943fe031ed3dca85479ee9ec47ceaf776b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
{ return key==other.key && lang==other.lang; }
inline bool operator!= (const QImageTextKeyLang &other) const
{ return !operator==(other); }
+private:
+ friend class QImage;
+ QImageTextKeyLang(bool /*dummy*/) {}
};
#endif
for (int i = 0; i < keys.size(); ++i) {
int index = keys.at(i).indexOf(QLatin1Char('/'));
if (index > 0) {
- QImageTextKeyLang tkl;
+ QImageTextKeyLang tkl(true);
tkl.key = keys.at(i).left(index).toAscii();
tkl.lang = keys.at(i).mid(index+1).toAscii();
imageTextKeys += tkl;