Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macosx #3

Merged
merged 2 commits into from
Mar 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WIMUStudio2/Libs/Qwt-6.1.3/qwtconfig.pri
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ QWT_CONFIG += QwtOpenGL
# Otherwise you have to build it from the designer directory.
######################################################################

QWT_CONFIG += QwtDesigner
#QWT_CONFIG += QwtDesigner

######################################################################
# Compile all Qwt classes into the designer plugin instead
Expand Down Expand Up @@ -161,7 +161,7 @@ win32 {

macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) {

QWT_CONFIG += QwtFramework
# QWT_CONFIG += QwtFramework
}

######################################################################
Expand Down
10 changes: 8 additions & 2 deletions WIMUStudio2/Src/WIMUStudioMain.pro
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,13 @@ FORMS += mainwindow.ui \
eventsbrowser.ui

#include (C:\Qwt-6.1.3\features\qwt.prf)
CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../Libs/Qwt-6.1.3/lib -lqwtd
#TODO - Verify debug file name for qwt
CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../Libs/Qwt-6.1.3/lib -lqwt
CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../Libs/Qwt-6.1.3/lib -lqwt
LIBS += -lglu32 -lopengl32

win32 {
LIBS += -lglu32 -lopengl32
}

RC_ICONS = images/WIMU2.ico

Expand All @@ -90,3 +94,5 @@ INSTALLS += extra_libs
RESOURCES += \
wimustudio2.qrc



17 changes: 15 additions & 2 deletions WIMUStudio2/Src/wimuprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#ifdef __APPLE__
#include <utime.h>
#else
#include <sys/utime.h>
#endif
#include <time.h>

#include "wimufile.h"
Expand Down Expand Up @@ -1528,7 +1532,8 @@ bool WimuProcessor::isTimestampValid(const quint64 &ts){
}

void WimuProcessor::setFileModificationTime(const QString &filename, quint32 ts){
struct _utimbuf ut;


QDateTime filetime;
qint64 file_ts;

Expand All @@ -1550,11 +1555,19 @@ void WimuProcessor::setFileModificationTime(const QString &filename, quint32 ts)
}

//qDebug() << "** New Time = " << file_ts << QDateTime::fromSecsSinceEpoch(file_ts);

#if __APPLE__
//TODO APPLE implementation
struct utimbuf ut;
ut.modtime = file_ts;
ut.actime = file_ts;
utime(filename.toUtf8().data(), &ut);
#else
struct _utimbuf ut;
ut.modtime = file_ts;
ut.actime = file_ts;

_utime( filename.toUtf8().data(), &ut );
#endif
}

quint32 WimuProcessor::adjustTimeForTimeZone(quint32 ts, bool ignore_wimu_offset){
Expand Down