Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
Conflicts:
	CMakeLists.txt
  • Loading branch information
projekter committed Sep 18, 2015
2 parents 66804cd + d0d2e4f commit 2c61aef
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
@@ -1,5 +1,7 @@
language: cpp
sudo: required
services:
- docker
os:
- linux
- osx
Expand All @@ -9,11 +11,8 @@ compiler:
env:
- CMAKE_PARAMETERS="-DUseQtFive=ON"
- CMAKE_PARAMETERS="-DUseQtFive=OFF"
# - BUILDSYSTEM=outside
matrix:
fast_finish: true
allow_failures:
- env: CMAKE_PARAMETERS="-DUseQtFive=ON"
exclude:
- os: osx
env: CMAKE_PARAMETERS="-DUseQtFive=ON"
Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Expand Up @@ -30,8 +30,14 @@ option(UseQtFive "Build with Qt5 and libpoppler-qt5" OFF)
if(UseQtFive)
#qt5
message(STATUS "Using Qt5 and libpoppler-qt5")
<<<<<<< HEAD
set(CMAKE_PREFIX_PATH "C:/Qt/Static/qtbase")
find_package(Qt5Core REQUIRED)
=======
find_package(Qt5Core 5.1.1 REQUIRED)
# On lower versions, QTBUG-32100 prevents compilation at least on clang
# https://bugreports.qt.io/browse/QTBUG-32100
>>>>>>> origin/master
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5XML REQUIRED)
Expand Down Expand Up @@ -113,8 +119,13 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_definitions(-Wno-padded)
# in release mode: Unrechable code / Macro expansion (these stem from QDEBUG)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
add_definitions(-Wno-unreachable-code -Wno-unreachable-code -Wno-disabled-macro-expansion)
add_definitions(-Wno-unreachable-code -Wno-disabled-macro-expansion)
endif()
# Qt's moc (Meta Object Compiler) generates code that triggers warnings
# about undefined behaviours.

# So don't set Werror for it.
add_definitions(-Wno-error=undefined-reinterpret-cast)
else()
message(WARNING "Compiling with a Non-GNU compiler. A lot less warnings will be output, so more coding errors might go undetected.")
endif()
Expand Down
3 changes: 0 additions & 3 deletions _travis/install_dependencies
Expand Up @@ -12,9 +12,6 @@ if [ "$TRAVIS_OS_NAME" = "linux" ] ; then
# Update list of available packages in any case
DEPS="libboost-program-options-dev pkg-config"
if [ "$CMAKE_PARAMETERS" = "-DUseQtFive=ON" ] ; then
echo "Adding dannyedel ppa"
sudo add-apt-repository ppa:dannyedel/libpoppler-qt5-backports -y
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa -y
DEPS="${DEPS} libpoppler-qt5-dev qtbase5-dev"
else
DEPS="${DEPS} libpoppler-qt4-dev"
Expand Down
4 changes: 1 addition & 3 deletions pdfviewerwindow.cpp
Expand Up @@ -377,9 +377,7 @@ QString PDFViewerWindow::timeToString(const QTime & time) const

QString PDFViewerWindow::timeToString(int milliseconds) const
{
QTime time;
time.addMSecs(milliseconds);
return timeToString(time);
return timeToString(QTime(0,0).addMSecs(milliseconds));
}


Expand Down

0 comments on commit 2c61aef

Please sign in to comment.