Commit a0d528ca authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix info messages not displayed

parent 9900c13b
...@@ -29,3 +29,8 @@ qint64 QTimerWithTime::elapsed() const ...@@ -29,3 +29,8 @@ qint64 QTimerWithTime::elapsed() const
{ {
return m_time.elapsed(); return m_time.elapsed();
} }
bool QTimerWithTime::isValid() const
{
return m_time.isValid();
}
...@@ -29,6 +29,7 @@ class QTimerWithTime : public QTimer ...@@ -29,6 +29,7 @@ class QTimerWithTime : public QTimer
public: public:
virtual void start(int msec); virtual void start(int msec);
qint64 elapsed() const; qint64 elapsed() const;
bool isValid() const;
private: private:
QElapsedTimer m_time; QElapsedTimer m_time;
......
...@@ -149,10 +149,9 @@ void StatusBarMessageLabel::setMessage(const QString &text, MessageType type, in ...@@ -149,10 +149,9 @@ void StatusBarMessageLabel::setMessage(const QString &text, MessageType type, in
int delay = 800 * static_cast<int>(m_currentMessage.type == ErrorMessage || m_currentMessage.type == MltError); int delay = 800 * static_cast<int>(m_currentMessage.type == ErrorMessage || m_currentMessage.type == MltError);
m_queueTimer.start(delay); m_queueTimer.start(delay);
} else { } else {
// Message with normal priority // Message with normal priority
m_messageQueue.push_back(item); m_messageQueue.push_back(item);
if (m_queueTimer.elapsed() >= m_currentMessage.timeoutMillis) { if (!m_queueTimer.isValid() || m_queueTimer.elapsed() >= m_currentMessage.timeoutMillis) {
m_queueTimer.start(0); m_queueTimer.start(0);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment