qt4 build fix

This commit is contained in:
Patrick von Reth 2014-02-21 10:53:35 +01:00
parent b72e121728
commit 2175f42fd3
2 changed files with 11 additions and 5 deletions

View File

@ -27,7 +27,11 @@
using namespace Snore; using namespace Snore;
NotifyWidget::NotifyWidget(int pos,QWidget *parent) : NotifyWidget::NotifyWidget(int pos,QWidget *parent) :
QWidget(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus), QWidget(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
| Qt::WindowDoesNotAcceptFocus
#endif
),
ui(new Ui::NotifyWidget), ui(new Ui::NotifyWidget),
m_moveTimer(new QTimer(this)), m_moveTimer(new QTimer(this)),
m_desktop(QDesktopWidget().availableGeometry()), m_desktop(QDesktopWidget().availableGeometry()),
@ -68,6 +72,11 @@ NotifyWidget::NotifyWidget(int pos,QWidget *parent) :
m_moveTimer->setInterval(2); m_moveTimer->setInterval(2);
connect( m_moveTimer, SIGNAL(timeout()), this, SLOT(slotMove())); connect( m_moveTimer, SIGNAL(timeout()), this, SLOT(slotMove()));
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)//ugly bug in qt4 makes the widget resize
ui->titel->setWordWrap(true);
ui->body->setWordWrap(true);
#endif
} }
NotifyWidget::~NotifyWidget() NotifyWidget::~NotifyWidget()
@ -78,7 +87,7 @@ NotifyWidget::~NotifyWidget()
void NotifyWidget::display(const Notification &notification) void NotifyWidget::display(const Notification &notification)
{ {
update(notification); update(notification);
m_dist = 0; m_dist = 0;
m_moveTimer->start(); m_moveTimer->start();
snoreDebug( SNORE_DEBUG ) << notification.id(); snoreDebug( SNORE_DEBUG ) << notification.id();

View File

@ -176,9 +176,6 @@
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>