Commit f32c26fa authored by David Jarvie's avatar David Jarvie

Show correct alarm columns in main window on first run

Fixes regression introduced in version 3.1.0.
parent b0a3f2a5
Pipeline #44319 passed with stage
in 12 minutes and 28 seconds
KAlarm Change Log
=== Version 3.1.1 (KDE Applications 20.12.1) --- 15 December 2020 ===
=== Version 3.1.1 (KDE Applications 20.12.1) --- 16 December 2020 ===
* Ensure that build uses the file resources option.
* Fix regression introduced in version 3.1.0:
Show correct alarm columns in main window on first run of KAlarm.
=== Version 3.1.0 (KDE Applications 20.12) --- 14 November 2020 ===
* Add option to show alarm message as a notification instead of in a window [KDE Bug 345922]
......
......@@ -222,4 +222,4 @@ add_executable(kalarm_helper rtcwakeaction.cpp ${libkalarm_common_SRCS})
target_link_libraries(kalarm_helper KF5::AuthCore KF5::I18n)
install(TARGETS kalarm_helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
kauth_install_helper_files(kalarm_helper org.kde.kalarm.rtcwake root)
kauth_install_actions(org.kde.kalarm.rtcwake data/org.kde.kalarm.rtcwake.actions)
#kauth_install_actions(org.kde.kalarm.rtcwake data/org.kde.kalarm.rtcwake.actions)
......@@ -64,7 +64,7 @@ void AlarmListView::setColumnsVisible(const QList<bool>& show)
const bool useName = Preferences::useAlarmName();
QList<bool> vis{ true, false, true, true, true, !useName };
const int colCount = useName ? 6 : 5;
for (int i = 0; i < colCount; ++i)
for (int i = 0, count = std::min(colCount, show.count()); i < count; ++i)
vis[i] = show[i];
header()->setSectionHidden(AlarmListModel::TimeColumn, !vis[0]);
header()->setSectionHidden(AlarmListModel::TimeToColumn, !vis[1]);
......
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