Commit 2198e991 authored by David Jarvie's avatar David Jarvie
Browse files

Make main window last column tooltips consistent

parent c309916c
Pipeline #29665 passed with stage
in 16 minutes and 58 seconds
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "find.h" #include "find.h"
#include "resources/eventmodel.h" #include "resources/eventmodel.h"
#include "resources/resourcedatamodelbase.h"
#include "kalarm_debug.h" #include "kalarm_debug.h"
#include <KLocalizedString> #include <KLocalizedString>
...@@ -178,7 +179,8 @@ bool EventListView::viewportEvent(QEvent* e) ...@@ -178,7 +179,8 @@ bool EventListView::viewportEvent(QEvent* e)
if (i < 0) if (i < 0)
{ {
EventListModel* m = qobject_cast<EventListModel*>(model()); EventListModel* m = qobject_cast<EventListModel*>(model());
if (!m || m->event(index).commandError() == KAEvent::CMD_NO_ERROR) if (index.column() == ResourceDataModelBase::TextColumn
|| !m || m->event(index).commandError() == KAEvent::CMD_NO_ERROR)
{ {
// Single line tooltip. Only display it if the text column // Single line tooltip. Only display it if the text column
// is truncated in the view display. // is truncated in the view display.
......
...@@ -472,7 +472,6 @@ QVariant ResourceDataModelBase::eventData(int role, int column, const KAEvent& e ...@@ -472,7 +472,6 @@ QVariant ResourceDataModelBase::eventData(int role, int column, const KAEvent& e
// Return empty string to cancel any previous tooltip - // Return empty string to cancel any previous tooltip -
// returning QVariant() leaves tooltip unchanged. // returning QVariant() leaves tooltip unchanged.
return QString(); return QString();
break;
} }
break; break;
case EnabledRole: case EnabledRole:
......
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