Permalink
Browse files

Fix: check qt version for compiling code under Qt5.4

  • Loading branch information...
1 parent b6e8b13 commit 59478b43f3f5ca8f6eabffb17602f898b0f8f635 @chchwy chchwy committed Jan 11, 2017
Showing with 9 additions and 8 deletions.
  1. +2 −2 core_lib/managers/viewmanager.cpp
  2. +0 −1 core_lib/structure/soundclip.h
  3. +7 −5 core_lib/util/pencilerror.cpp
@@ -54,12 +54,12 @@ QPainterPath ViewManager::mapCanvasToScreen( const QPainterPath& path )
QRectF ViewManager::mapCanvasToScreen( const QRectF& rect )
{
- return std::move( mView.mapRect( rect ) );
+ return mView.mapRect( rect ) ;
}
QRectF ViewManager::mapScreenToCanvas( const QRectF& rect )
{
- return std::move( mView.inverted().mapRect( rect ) );
+ return mView.inverted().mapRect( rect ) ;
}
QPainterPath ViewManager::mapScreenToCanvas( const QPainterPath& path )
@@ -25,7 +25,6 @@ class SoundClip : public KeyFrame
private:
std::shared_ptr< SoundPlayer > mPlayer;
- uint64_t m_soundSize = 0;
};
#endif // SOUNDCLIP_H
@@ -5,11 +5,11 @@
#include <QSysInfo>
#include "pencildef.h"
-Status::Status(Status::ErrorCode eCode, QStringList detailsList, QString title, QString description) :
- mCode( eCode ),
- mTitle( title ),
- mDescription( description ),
- mDetails( detailsList )
+Status::Status(Status::ErrorCode eCode, QStringList detailsList, QString title, QString description)
+ : mCode( eCode )
+ , mTitle( title )
@scribblemaniac
scribblemaniac Jan 12, 2017 Contributor

Is this really the format you want to use for initializer lists? I don't see it being used anywhere else.

@chchwy
chchwy Jan 12, 2017 Member

this is sort of comment-friendly style, can comment any single line and don't need to worry about trailing comma.

However it is just my personal preference, not a have-to or rule.

+ , mDescription( description )
+ , mDetails( detailsList )
{
}
@@ -46,6 +46,7 @@ QString Status::details()
mDescription )
);
details.append("<br><br>");
+#if QT_VERSION >= 0x050400
details.append( QString(
"System Info<br>"
"Pencil version: %1<br>"
@@ -58,6 +59,7 @@ QString Status::details()
QSysInfo::kernelVersion(),
QSysInfo::prettyProductName() )
);
+#endif
return details;
}

0 comments on commit 59478b4

Please sign in to comment.