forked from qt-creator/qt-creator
Remove one hack of the QTipLabel hack.
This code used two hacks: it created a class with metaObject()->className() == "QTipLabel" to fool the code in Qt into applying the style properly to this class. But it did that by creating a class called QTipLabel. This works as long as the class in Qt is hidden by symbol visibility. When symbol visibility is disabled (for whatever reason), then Creator simply crashes due to size mismatches and memory corruptions (virtual tables, etc.) This patch makes the class be called TextEditor::Internal::QTipLabel, but fools moc into thinking it isn't. A proper solution would be to simply override the meta object. Signed-off-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
committed by
Leandro Melo
parent
67d0ab3fac
commit
7e48b8e5be
@@ -38,7 +38,10 @@ namespace TextEditor {
|
||||
class TipContent;
|
||||
}
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
#ifndef Q_MOC_RUN
|
||||
namespace TextEditor {
|
||||
namespace Internal {
|
||||
#endif
|
||||
|
||||
// Please do not change the name of this class. Detailed comments in tooltip.h.
|
||||
class QTipLabel : public QLabel
|
||||
@@ -60,11 +63,6 @@ private:
|
||||
TextEditor::TipContent *m_tipContent;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace TextEditor {
|
||||
namespace Internal {
|
||||
|
||||
class ColorTip : public QTipLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -96,7 +94,9 @@ private:
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
};
|
||||
|
||||
#ifndef Q_MOC_RUN
|
||||
} // namespace Internal
|
||||
} // namespace TextEditor
|
||||
#endif
|
||||
|
||||
#endif // TIPS_H
|
||||
|
||||
Reference in New Issue
Block a user