Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

Commit

Permalink
0.9.4.1 - Fix windows #define and alarmmodel assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
3vi1 committed Aug 5, 2017
1 parent 346819b commit 9430132
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
5 changes: 5 additions & 0 deletions docs/RELEASES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.9.4.1 - Fixed bug where #defines were not working with newest qt/gcc.
(thanks Hibasnev!)

Fixed bug where Windows build would assert setting alarms.

0.9.4 - Fixed crash when jump bridges fail to load. Also suppressed
the error message, since most systems won't have jump bridges.

Expand Down
10 changes: 7 additions & 3 deletions src/alarmmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,13 @@ void AlarmModel::setAlarms(QList<Alarm> newAlarms)
if(newAlarms.count() <= 0)
return;

beginRemoveRows(QModelIndex(), 0, alarms.count()-1);
alarms.clear();
endRemoveRows();
if(alarms.count() > 0)
{
beginRemoveRows(QModelIndex(), 0, alarms.count()-1);
alarms.clear();
endRemoveRows();
}

beginInsertRows(QModelIndex(), 0, newAlarms.count()-1);
alarms = newAlarms;
endInsertRows();
Expand Down
4 changes: 2 additions & 2 deletions src/logcatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ void LogCatcher::findCurrentLogs(const QString& dirName)
// are in them.

QString channelName = logNameRegEx.cap(1);
if(m_options->getIntelChannels().contains(channelName))
//if(!localChannels.contains(channelName))
//if(m_options->getIntelChannels().contains(channelName))
if(!localChannels.contains(channelName))
{
QMutableListIterator<QFileInfo> i(infoList);
while (i.hasNext()) {
Expand Down
24 changes: 12 additions & 12 deletions src/logcatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@
#ifndef LOGCATCHER_H
#define LOGCATCHER_H

/* On Linux, QFileSystemWatcher works fine. On Windows, it works 50% (dirs only) thanks to
* the way Windows doesn't update the file modified time on flush(). See the bug report at
* https://bugreports.qt.io/browse/QTBUG-41119 for more details.
*
* So... On Windows we currently need to use a timer-based hack to check the individual
* files.
*/

#ifdef Q_OS_WIN32 // Q_OS_LINUX
#define USE_FALLBACK_POLLER
#endif

/* For some reason, actually using the above define in this same file ends up with the
* QTimer not firing?!?! At least it does when testing with gcc on Linux. That's why I
* do not use the flag below to optimize what's built on Linux.
Expand All @@ -47,6 +35,18 @@

#include "options.h"

/* On Linux, QFileSystemWatcher works fine. On Windows, it works 50% (dirs only) thanks to
* the way Windows doesn't update the file modified time on flush(). See the bug report at
* https://bugreports.qt.io/browse/QTBUG-41119 for more details.
*
* So... On Windows we currently need to use a timer-based hack to check the individual
* files.
*/

#ifdef Q_OS_WIN32 // Q_OS_LINUX
#define USE_FALLBACK_POLLER
#endif

using namespace std;


Expand Down

0 comments on commit 9430132

Please sign in to comment.