r18194 by fschmid - Port to Qt5:
scribus-commit
scribus-commit at lists.scribus.net
Sun Mar 10 21:36:32 UTC 2013
Author: fschmid
Date: Sun Mar 10 21:36:32 2013
New Revision: 18194
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18194
Log:
Port to Qt5:
To enable building against Qt5 use the new commandline options:
-DUSE_QT5=1
-DQT_PREFIX="path _to_your_Qt5_installation"
when calling cmake
Only thing that does't work is the upgradechecker class as it depends on deprecated Qt4 classes, and needs a complete rewrite.
Default for building is still Qt4, so a normal cmake call without the options above still results in a build against
Qt4.
Modified:
trunk/Scribus/CMakeLists.txt
trunk/Scribus/resources/translations/po/CMakeLists.txt
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/canvas.cpp
trunk/Scribus/scribus/canvasgesture_resize.cpp
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/canvasmode_objimport.cpp
trunk/Scribus/scribus/chartablemodel.cpp
trunk/Scribus/scribus/chartablemodel.h
trunk/Scribus/scribus/designer/CMakeLists.txt
trunk/Scribus/scribus/fontlistmodel.cpp
trunk/Scribus/scribus/gtgettext.cpp
trunk/Scribus/scribus/guidesmodel.cpp
trunk/Scribus/scribus/latexhelpers.cpp
trunk/Scribus/scribus/menumanager.cpp
trunk/Scribus/scribus/pageitem_imageframe.cpp
trunk/Scribus/scribus/pageitem_textframe.cpp
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/pdflib_core.h
trunk/Scribus/scribus/plugins/barcodegenerator/CMakeLists.txt
trunk/Scribus/scribus/plugins/colorwheel/CMakeLists.txt
trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
trunk/Scribus/scribus/plugins/colorwheel/cwdialog.h
trunk/Scribus/scribus/plugins/fileloader/scribus12format/CMakeLists.txt
trunk/Scribus/scribus/plugins/fileloader/scribus134format/CMakeLists.txt
trunk/Scribus/scribus/plugins/fileloader/scribus13format/CMakeLists.txt
trunk/Scribus/scribus/plugins/fileloader/scribus150format/CMakeLists.txt
trunk/Scribus/scribus/plugins/fontpreview/CMakeLists.txt
trunk/Scribus/scribus/plugins/gettext/csvim/CMakeLists.txt
trunk/Scribus/scribus/plugins/gettext/docim/CMakeLists.txt
trunk/Scribus/scribus/plugins/gettext/htmlim/CMakeLists.txt
trunk/Scribus/scribus/plugins/gettext/odtim/CMakeLists.txt
trunk/Scribus/scribus/plugins/gettext/sxwim/CMakeLists.txt
trunk/Scribus/scribus/plugins/gettext/textfilter/CMakeLists.txt
trunk/Scribus/scribus/plugins/gettext/xtgim/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/ai/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/cgm/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/cvg/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/drw/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/idml/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/oodraw/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/pct/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/pdf/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/ps/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/shape/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/sml/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/svg/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/uniconvertor/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/wmf/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
trunk/Scribus/scribus/plugins/import/wpg/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/xar/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/xfig/CMakeLists.txt
trunk/Scribus/scribus/plugins/imposition/CMakeLists.txt
trunk/Scribus/scribus/plugins/myplugin/CMakeLists.txt
trunk/Scribus/scribus/plugins/newfromtemplateplugin/CMakeLists.txt
trunk/Scribus/scribus/plugins/picbrowser/CMakeLists.txt
trunk/Scribus/scribus/plugins/picbrowser/loadimage.cpp
trunk/Scribus/scribus/plugins/pixmapexport/CMakeLists.txt
trunk/Scribus/scribus/plugins/saveastemplateplugin/CMakeLists.txt
trunk/Scribus/scribus/plugins/scripter/CMakeLists.txt
trunk/Scribus/scribus/plugins/scriptplugin/CMakeLists.txt
trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp
trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
trunk/Scribus/scribus/plugins/short-words/CMakeLists.txt
trunk/Scribus/scribus/plugins/short-words/swsyntaxhighlighter.h
trunk/Scribus/scribus/plugins/svgexplugin/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
trunk/Scribus/scribus/plugins/tools/flattenpath/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/hunspellcheck/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/lenseffects/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp
trunk/Scribus/scribus/plugins/tools/pathconnect/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
trunk/Scribus/scribus/plugins/tools/pathcut/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/pathfinder/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/pathstroker/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/smoothpath/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/spellcheck/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/subdivide/CMakeLists.txt
trunk/Scribus/scribus/plugins/tools/transform/CMakeLists.txt
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/scimagestructs.cpp
trunk/Scribus/scribus/scimgdataloader_jpeg.cpp
trunk/Scribus/scribus/scimgdataloader_pdf.cpp
trunk/Scribus/scribus/scimgdataloader_ps.cpp
trunk/Scribus/scribus/scimgdataloader_tiff.cpp
trunk/Scribus/scribus/scpageoutput.cpp
trunk/Scribus/scribus/scraction.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusapp.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/scribuswin.cpp
trunk/Scribus/scribus/scribuswin.h
trunk/Scribus/scribus/styles/CMakeLists.txt
trunk/Scribus/scribus/text/CMakeLists.txt
trunk/Scribus/scribus/text/frect.h
trunk/Scribus/scribus/text/fsize.cpp
trunk/Scribus/scribus/ui/AdapterWidget.cpp
trunk/Scribus/scribus/ui/AdapterWidget.h
trunk/Scribus/scribus/ui/about.cpp
trunk/Scribus/scribus/ui/aligndistribute.cpp
trunk/Scribus/scribus/ui/aligndistribute.h
trunk/Scribus/scribus/ui/checkDocument.cpp
trunk/Scribus/scribus/ui/cpalette.cpp
trunk/Scribus/scribus/ui/cpalette.h
trunk/Scribus/scribus/ui/createrange.cpp
trunk/Scribus/scribus/ui/createrange.h
trunk/Scribus/scribus/ui/cupsoptions.cpp
trunk/Scribus/scribus/ui/customfdialog.cpp
trunk/Scribus/scribus/ui/extimageprops.cpp
trunk/Scribus/scribus/ui/fontreplacedialog.cpp
trunk/Scribus/scribus/ui/gradientpreview.cpp
trunk/Scribus/scribus/ui/gtfiledialog.cpp
trunk/Scribus/scribus/ui/guidemanager.cpp
trunk/Scribus/scribus/ui/guidemanager.h
trunk/Scribus/scribus/ui/inlinepalette.cpp
trunk/Scribus/scribus/ui/insertaframe.cpp
trunk/Scribus/scribus/ui/javadocs.cpp
trunk/Scribus/scribus/ui/latexeditor.cpp
trunk/Scribus/scribus/ui/layers.cpp
trunk/Scribus/scribus/ui/loremipsum.cpp
trunk/Scribus/scribus/ui/multipleduplicate.cpp
trunk/Scribus/scribus/ui/multipleduplicate.h
trunk/Scribus/scribus/ui/multiprogressdialog.cpp
trunk/Scribus/scribus/ui/multiprogressdialog.h
trunk/Scribus/scribus/ui/outlinepalette.cpp
trunk/Scribus/scribus/ui/pageitemattributes.cpp
trunk/Scribus/scribus/ui/pageitemattributes.h
trunk/Scribus/scribus/ui/pagepalette_pages.cpp
trunk/Scribus/scribus/ui/paintmanager.cpp
trunk/Scribus/scribus/ui/patternpropsdialog.cpp
trunk/Scribus/scribus/ui/picstatus.cpp
trunk/Scribus/scribus/ui/prefs_fonts.cpp
trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h
trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
trunk/Scribus/scribus/ui/preview.cpp
trunk/Scribus/scribus/ui/printdialog.cpp
trunk/Scribus/scribus/ui/propertiespalette_image.cpp
trunk/Scribus/scribus/ui/query.cpp
trunk/Scribus/scribus/ui/query.h
trunk/Scribus/scribus/ui/replacecolors.cpp
trunk/Scribus/scribus/ui/scdockpalette.cpp
trunk/Scribus/scribus/ui/scdockpalette.h
trunk/Scribus/scribus/ui/scinputdialog.cpp
trunk/Scribus/scribus/ui/scinputdialog.h
trunk/Scribus/scribus/ui/scrapbookpalette.cpp
trunk/Scribus/scribus/ui/scrpalettebase.cpp
trunk/Scribus/scribus/ui/scrpalettebase.h
trunk/Scribus/scribus/ui/sctextbrowser.cpp
trunk/Scribus/scribus/ui/sctreewidget.cpp
trunk/Scribus/scribus/ui/shadebutton.cpp
trunk/Scribus/scribus/ui/shortcutwidget.cpp
trunk/Scribus/scribus/ui/smpstylewidget.cpp
trunk/Scribus/scribus/ui/storyeditor.cpp
trunk/Scribus/scribus/ui/symbolpalette.cpp
trunk/Scribus/scribus/ui/tablesideselector.cpp
trunk/Scribus/scribus/ui/transparencypalette.cpp
trunk/Scribus/scribus/ui/transparencypalette.h
trunk/Scribus/scribus/undogui.cpp
trunk/Scribus/scribus/undogui.h
trunk/Scribus/scribus/util.cpp
trunk/Scribus/scribus/util_ghostscript.cpp
trunk/Scribus/scribus/util_icon.cpp
trunk/Scribus/scribus/util_printer.cpp
Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -444,57 +444,129 @@
########## Find Dependencies ##########
#<< Qt
-SET (QT_MT_REQUIRED TRUE)
-SET (QT_MIN_VERSION "4.7.0")
-IF (APPLE)
- IF (WANT_QT4MAC_COCOA)
- SET (QT_MAC_USE_COCOA TRUE)
- ENDIF (WANT_QT4MAC_COCOA)
- SET( QT_USE_QTSQL TRUE )
-ENDIF (APPLE)
-IF (WANT_QT3SUPPORT)
- SET (QT_USE_QT3SUPPORT TRUE)
-ELSE (WANT_QT3SUPPORT)
- SET (QT_USE_QT3SUPPORT FALSE)
-ENDIF (WANT_QT3SUPPORT)
-SET (QT_USE_QTXML TRUE )
-SET (QT_USE_QTWEBKIT TRUE )
-SET (QT_USE_QTOPENGL TRUE )
-SET( QT_USE_QTNETWORK TRUE )
-FIND_PACKAGE(Qt4 REQUIRED)
-INCLUDE( ${QT_USE_FILE} )
-IF (QT_FOUND)
- MESSAGE("Qt4 Found OK")
+IF(USE_QT5)
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
+ SET(CMAKE_PREFIX_PATH "${QT_PREFIX}/lib/cmake")
+ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
+ FIND_PACKAGE(Qt5Core REQUIRED)
+ IF(Qt5Core_FOUND)
+ MESSAGE(STATUS "----- USE QT 5-----")
+ ELSE(Qt5Core_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: No QT 5 found")
+ ENDIF(Qt5Core_FOUND)
+ FIND_PACKAGE(Qt5Widgets REQUIRED)
+ IF(Qt5Widgets_FOUND)
+ MESSAGE(STATUS "----- USE QT Widgets-----")
+ ELSE(Qt5Widgets_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: No QT Widgets found")
+ ENDIF(Qt5Widgets_FOUND)
+ FIND_PACKAGE(Qt5Gui REQUIRED)
+ IF(Qt5Gui_FOUND)
+ MESSAGE(STATUS "----- USE Qt5Gui -----")
+ ELSE(Qt5Gui_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: Qt5Gui found")
+ ENDIF(Qt5Gui_FOUND)
+ FIND_PACKAGE(Qt5Xml REQUIRED)
+ IF(Qt5Xml_FOUND)
+ MESSAGE(STATUS "----- USE QT 5 XML -----")
+ ELSE(Qt5Xml_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: No QT 5 XML found")
+ ENDIF(Qt5Xml_FOUND)
+ FIND_PACKAGE(Qt5WebKit REQUIRED)
+ IF(Qt5WebKit_FOUND)
+ MESSAGE(STATUS "----- USE Qt5WebKit -----")
+ ELSE(Qt5WebKit_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: No Qt5WebKit found")
+ ENDIF(Qt5WebKit_FOUND)
+ FIND_PACKAGE(Qt5WebKitWidgets REQUIRED)
+ IF(Qt5WebKitWidgets_FOUND)
+ MESSAGE(STATUS "----- USE Qt5WebKitWidgets -----")
+ ELSE(Qt5WebKitWidgets_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: No Qt5WebKitWidgets found")
+ ENDIF(Qt5WebKitWidgets_FOUND)
+ FIND_PACKAGE(Qt5Network REQUIRED)
+ IF(Qt5Network_FOUND)
+ MESSAGE(STATUS "----- USE Qt5Network -----")
+ ELSE(Qt5Network_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: No Qt5Network found")
+ ENDIF(Qt5Network_FOUND)
+ FIND_PACKAGE(Qt5OpenGL REQUIRED)
+ IF(Qt5OpenGL_FOUND)
+ MESSAGE(STATUS "----- USE Qt5OpenGL -----")
+ ELSE(Qt5OpenGL_FOUND)
+ MESSAGE(FATAL_ERROR "ERROR: No Qt5OpenGL found")
+ ENDIF(Qt5OpenGL_FOUND)
+ INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5Core_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${Qt5Gui_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5Gui_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${Qt5Xml_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5Xml_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${Qt5WebKit_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5WebKit_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${Qt5WebKitWidgets_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5WebKitWidgets_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${Qt5Network_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5Network_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${Qt5OpenGL_DEFINITIONS})
+ ADD_DEFINITIONS(-DUSE_QT5)
+
+ELSE(USE_QT5)
+ SET (QT_MT_REQUIRED TRUE)
+ SET (QT_MIN_VERSION "4.7.0")
+ IF (APPLE)
+ IF (WANT_QT4MAC_COCOA)
+ SET (QT_MAC_USE_COCOA TRUE)
+ ENDIF (WANT_QT4MAC_COCOA)
+ SET( QT_USE_QTSQL TRUE )
+ ENDIF (APPLE)
+ IF (WANT_QT3SUPPORT)
+ SET (QT_USE_QT3SUPPORT TRUE)
+ ELSE (WANT_QT3SUPPORT)
+ SET (QT_USE_QT3SUPPORT FALSE)
+ ENDIF (WANT_QT3SUPPORT)
+ SET (QT_USE_QTXML TRUE )
+ SET (QT_USE_QTWEBKIT TRUE )
+ SET (QT_USE_QTOPENGL TRUE )
+ SET( QT_USE_QTNETWORK TRUE )
+ FIND_PACKAGE(Qt4 REQUIRED)
+ INCLUDE( ${QT_USE_FILE} )
+ IF (QT_FOUND)
+ MESSAGE("Qt4 Found OK")
# we wont turn around, lets make it required
- IF(QT_QTWEBKIT_FOUND)
- MESSAGE(STATUS "QtWebkit Found OK")
- ELSE(QT_QTWEBKIT_FOUND)
- MESSAGE(FATAL_ERROR "QtWebKit not found")
- ENDIF(QT_QTWEBKIT_FOUND)
-
- IF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 4 AND QT_VERSION_PATCH EQUAL 0)
- MESSAGE(STATUS "Warning: Qt 4.4.0 has some bugs relating to decimal notation and line drawing. Please refer to Scribus bug 6999 and 7187 for information and to check if this may affect your use. Please use 4.4.1+ on release for your platform/distribution.")
- ENDIF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 4 AND QT_VERSION_PATCH EQUAL 0)
- IF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 3)
- MESSAGE(STATUS "Warning: Some versions of Qt 4.3.x have a bug influencing layout in the Scribus Properties Palette (refer to Scribus bug 7107). Please upgrade to Qt 4.4.1+ on release (4.4.0 has a decimal notation bug)")
- ENDIF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 3)
- IF (WANT_QT3SUPPORT)
- MESSAGE(STATUS "Building with Qt3 Support")
- ELSE (WANT_QT3SUPPORT)
- MESSAGE(STATUS "Building without Qt3 Support (GOOD)")
- ENDIF (WANT_QT3SUPPORT)
- #Add our Qt definitions
- ADD_DEFINITIONS(
- ${QT_DEFINITIONS}
- -DQT_CORE_LIB
- -DQT_GUI_LIB
- -DQT_THREAD_LIB
- -DQT_XML_LIB
- -DQT_GL_LIB
- )
-ELSE(QT_FOUND)
- MESSAGE(FATAL_ERROR "No Qt4 found")
-ENDIF(QT_FOUND)
+ IF(QT_QTWEBKIT_FOUND)
+ MESSAGE(STATUS "QtWebkit Found OK")
+ ELSE(QT_QTWEBKIT_FOUND)
+ MESSAGE(FATAL_ERROR "QtWebKit not found")
+ ENDIF(QT_QTWEBKIT_FOUND)
+
+ IF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 4 AND QT_VERSION_PATCH EQUAL 0)
+ MESSAGE(STATUS "Warning: Qt 4.4.0 has some bugs relating to decimal notation and line drawing. Please refer to Scribus bug 6999 and 7187 for information and to check if this may affect your use. Please use 4.4.1+ on release for your platform/distribution.")
+ ENDIF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 4 AND QT_VERSION_PATCH EQUAL 0)
+ IF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 3)
+ MESSAGE(STATUS "Warning: Some versions of Qt 4.3.x have a bug influencing layout in the Scribus Properties Palette (refer to Scribus bug 7107). Please upgrade to Qt 4.4.1+ on release (4.4.0 has a decimal notation bug)")
+ ENDIF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 3)
+ IF (WANT_QT3SUPPORT)
+ MESSAGE(STATUS "Building with Qt3 Support")
+ ELSE (WANT_QT3SUPPORT)
+ MESSAGE(STATUS "Building without Qt3 Support (GOOD)")
+ ENDIF (WANT_QT3SUPPORT)
+ #Add our Qt definitions
+ ADD_DEFINITIONS(
+ ${QT_DEFINITIONS}
+ -DQT_CORE_LIB
+ -DQT_GUI_LIB
+ -DQT_THREAD_LIB
+ -DQT_XML_LIB
+ -DQT_GL_LIB
+ )
+ ELSE(QT_FOUND)
+ MESSAGE(FATAL_ERROR "No Qt4 found")
+ ENDIF(QT_FOUND)
+ENDIF(USE_QT5)
#>> Qt
#<< ZLIB, PNG
Modified: trunk/Scribus/resources/translations/po/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/resources/translations/po/CMakeLists.txt
==============================================================================
--- trunk/Scribus/resources/translations/po/CMakeLists.txt (original)
+++ trunk/Scribus/resources/translations/po/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -27,7 +27,7 @@
#MESSAGE(STATUS "You want to install ${LANGSTR}:${WANTED_LANG}")
SET(QM_FILENAME "scribus.${LANGSTR}.qm")
ADD_CUSTOM_TARGET("release_ts_${LANGSTR}" ALL
- COMMAND ${QT_LRELEASE_EXECUTABLE} ${TS_FILEPATH} -silent -qm ${QM_FILENAME}
+ COMMAND lrelease ${TS_FILEPATH} -silent -qm ${QM_FILENAME}
DEPENDS ${TS_FILEPATH}
)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${QM_FILENAME}" DESTINATION ${SHAREDIR}/translations)
@@ -42,7 +42,7 @@
STRING(REPLACE "." "" LANGSTR ${LANGSTR})
SET(QM_FILENAME "scribus.${LANGSTR}.qm")
ADD_CUSTOM_TARGET("release_ts_${LANGSTR}" ALL
- COMMAND ${QT_LRELEASE_EXECUTABLE} ${TS_FILEPATH} -silent -qm ${QM_FILENAME}
+ COMMAND lrelease ${TS_FILEPATH} -silent -qm ${QM_FILENAME}
DEPENDS ${TS_FILEPATH}
)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${QM_FILENAME}" DESTINATION ${SHAREDIR}/translations)
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -65,6 +65,12 @@
ui/pageitempositionsetter.cpp
ui/pageitemrotationsetter.cpp
)
+
+
+IF(NOT USE_QT5)
+ SET(SCRIBUS_QT4_SRC upgradechecker.cpp)
+ SET(SCRIBUS_QT4_CLASS upgradechecker.h)
+ENDIF(NOT USE_QT5)
SET(SCRIBUS_UI_SRC
ui/aboutplugins.ui
@@ -262,7 +268,6 @@
tocgenerator.h
undogui.h
undomanager.h
- upgradechecker.h
urllauncher.h
ui/about.h
ui/aboutplugins.h
@@ -490,6 +495,7 @@
ui/vruler.h
ui/weldedit.h
# ${SCRIBUS_ITEMSETTERS_CLASS}
+ ${SCRIBUS_QT4_CLASS}
${SCRIBUS_OSG_CLASS}
)
@@ -696,7 +702,6 @@
units.cpp
unzip.c
updatemanager.cpp
- upgradechecker.cpp
urllauncher.cpp
util.cpp
util_color.cpp
@@ -942,6 +947,7 @@
ui/useprintermarginsdialog.cpp
ui/weldedit.cpp
# ${SCRIBUS_ITEMSETTERS_SRC}
+ ${SCRIBUS_QT4_SRC}
${SCRIBUS_OSG_SRC}
${SCRIBUS_GMAGICK_SRC}
)
@@ -969,12 +975,21 @@
SET(SCRIBUS_MAIN_CPP main.cpp)
ENDIF(WIN32)
+IF(USE_QT5)
+QT5_WRAP_UI(SCRIBUS_UI_SOURCES ${SCRIBUS_UI_SRC} )
+
+QT5_WRAP_CPP(SCRIBUS_MOC_SOURCES
+ ${SCRIBUS_MOC_CLASSES}
+ ${SCRIBUS_MOC_WIN32_ONLY_CLASSES}
+ )
+ELSE(USE_QT5)
QT4_WRAP_UI(SCRIBUS_UI_SOURCES ${SCRIBUS_UI_SRC} )
QT4_WRAP_CPP(SCRIBUS_MOC_SOURCES
${SCRIBUS_MOC_CLASSES}
${SCRIBUS_MOC_WIN32_ONLY_CLASSES}
)
+ENDIF(USE_QT5)
LINK_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/colormgmt
@@ -1140,6 +1155,28 @@
MESSAGE("RPATH: ${CMAKE_INSTALL_RPATH}")
+IF(USE_QT5)
+TARGET_LINK_LIBRARIES(${EXE_NAME}
+ ${Qt5Core_LIBRARIES}
+ ${Qt5Widgets_LIBRARIES}
+ ${Qt5Gui_LIBRARIES}
+ ${Qt5Xml_LIBRARIES}
+ ${Qt5WebKit_LIBRARIES}
+ ${Qt5WebKitWidgets_LIBRARIES}
+ ${Qt5Network_LIBRARIES}
+ ${Qt5OpenGL_LIBRARIES}
+ ${CUPS_LIBRARIES}
+ ${FREETYPE_LIBRARIES}
+ ${FONTCONFIG_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ ${TIFF_LIBRARIES}
+ ${JPEG_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ ${WIN32_ONLY_LIBS}
+ ${GMAGICK_LIBRARIES}
+)
+ELSE(USE_QT5)
TARGET_LINK_LIBRARIES(${EXE_NAME}
${QT_LIBRARIES}
${FREETYPE_LIBRARIES}
@@ -1152,6 +1189,7 @@
${WIN32_ONLY_LIBS}
${GMAGICK_LIBRARIES}
)
+ENDIF(USE_QT5)
IF (NOT WIN32 AND NOT HAIKU)
TARGET_LINK_LIBRARIES(${EXE_NAME}
@@ -1223,11 +1261,26 @@
ENDIF(HAVE_BOOST)
# Now build plugins
-SET(PLUGIN_LIBRARIES
- ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY}
- ${LIBXML2_LIBRARIES}
- ${ZLIB_LIBRARIES}
-)
+IF(USE_QT5)
+ SET(PLUGIN_LIBRARIES
+ ${Qt5Core_LIBRARIES}
+ ${Qt5Widgets_LIBRARIES}
+ ${Qt5Gui_LIBRARIES}
+ ${Qt5Xml_LIBRARIES}
+ ${Qt5WebKit_LIBRARIES}
+ ${Qt5WebKitWidgets_LIBRARIES}
+ ${Qt5Network_LIBRARIES}
+ ${Qt5OpenGL_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ )
+ELSE(USE_QT5)
+ SET(PLUGIN_LIBRARIES
+ ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY}
+ ${LIBXML2_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ )
+ENDIF(USE_QT5)
IF(WIN32)
# IF your plugin needs more than this, please link them privately
# in the CMakeLists.txt for your plugin.
Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Sun Mar 10 21:36:32 2013
@@ -2238,7 +2238,7 @@
if (!newRect.isNull())
{
if (!oldRect.isNull())
- newRect.unite(oldRect);
+ newRect.united(oldRect);
repaint(newRect.adjusted(-10, -10, 20, 20));
}
oldRect = newRect;
@@ -2253,7 +2253,7 @@
if (!newR.isNull())
{
if (!oldRect.isNull())
- newR.unite(oldRect);
+ newRect.united(oldRect);
// newR.moveBy(qRound(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale), qRound(-m_doc->minCanvasCoordinate.y() * m_viewMode.scale));
m_viewMode.redrawPolygon = newRect;
// m_viewMode.redrawPolygon.translate(qRound(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale), qRound(-m_doc->minCanvasCoordinate.y() * m_viewMode.scale));
Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp (original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp Sun Mar 10 21:36:32 2013
@@ -197,8 +197,8 @@
{
for (int i = 0; i < m_doc->m_Selection->count(); ++i)
m_doc->m_Selection->itemAt(i)->checkChanges();
- m_doc->invalidateRegion(m_mousePressBounds.unite(m_bounds));
- m_doc->regionsChanged()->update(m_mousePressBounds.unite(m_bounds));
+ m_doc->invalidateRegion(m_mousePressBounds.united(m_bounds));
+ m_doc->regionsChanged()->update(m_mousePressBounds.united(m_bounds));
m_doc->changed();
}
}
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Sun Mar 10 21:36:32 2013
@@ -1388,7 +1388,7 @@
poly = m.map(poly);
QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
QRectF newR(currItem->getBoundingRect());
- m_doc->regionsChanged()->update(newR.unite(oldR));
+ m_doc->regionsChanged()->update(newR.united(oldR));
}
m_doc->nodeEdit.ClRe = storedClRe;
}
@@ -1462,7 +1462,7 @@
poly = m.map(poly);
QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
QRectF newR(currItem->getBoundingRect());
- m_doc->regionsChanged()->update(newR.unite(oldR));
+ m_doc->regionsChanged()->update(newR.united(oldR));
}
m_doc->nodeEdit.ClRe = storedClRe;
}
@@ -1536,7 +1536,7 @@
poly = m.map(poly);
QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
QRectF newR(currItem->getBoundingRect());
- m_doc->regionsChanged()->update(newR.unite(oldR));
+ m_doc->regionsChanged()->update(newR.united(oldR));
}
m_doc->nodeEdit.ClRe = storedClRe;
}
@@ -1610,7 +1610,7 @@
poly = m.map(poly);
QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
QRectF newR(currItem->getBoundingRect());
- m_doc->regionsChanged()->update(newR.unite(oldR));
+ m_doc->regionsChanged()->update(newR.united(oldR));
}
m_doc->nodeEdit.ClRe = storedClRe;
}
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Sun Mar 10 21:36:32 2013
@@ -29,6 +29,7 @@
#include <QTimer>
#include <QToolTip>
#include <QWidgetAction>
+#include <QDrag>
#include <QDebug>
#include "canvas.h"
Modified: trunk/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_objimport.cpp Sun Mar 10 21:36:32 2013
@@ -23,6 +23,7 @@
#include <QMouseEvent>
#include <QPoint>
#include <QRect>
+#include <QMimeData>
#include <QDebug>
#include "canvas.h"
Modified: trunk/Scribus/scribus/chartablemodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/chartablemodel.cpp
==============================================================================
--- trunk/Scribus/scribus/chartablemodel.cpp (original)
+++ trunk/Scribus/scribus/chartablemodel.cpp Sun Mar 10 21:36:32 2013
@@ -101,8 +101,14 @@
// repaint only when doc differs
if (doc != m_doc)
{
+#ifdef USE_QT5
+ beginResetModel();
m_doc = doc;
- reset();
+ endResetModel();
+#else
+ m_doc = doc;
+ reset();
+#endif
}
}
@@ -113,6 +119,9 @@
void CharTableModel::setCharacters(CharClassDef ch)
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_characters.clear();
m_fonts.clear();
m_characters = ch;
@@ -120,16 +129,27 @@
{
m_fonts.append(m_fontInUse);
}
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
}
void CharTableModel::setCharactersAndFonts(CharClassDef ch, QStringList fonts)
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_characters.clear();
m_fonts.clear();
m_characters = ch;
m_fonts = fonts;
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
}
void CharTableModel::addCharacter(QString ch)
@@ -142,9 +162,16 @@
int val = si.toInt(&ok, 10);
if (!ok)
return;
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_characters.append(val);
m_fonts.append(sf);
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
if (orig < rowCount())
emit rowAppended();
}
@@ -153,8 +180,15 @@
{
if (font != m_fontInUse)
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_fontInUse = font;
- reset();
+#ifdef USE_QT5
+ endResetModel();
+#else
+ reset();
+#endif
}
}
@@ -173,9 +207,16 @@
if ((!m_characters.contains(val)) || (!m_fonts.contains(sf)))
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_characters.append(val);
m_fonts.append(sf);
- reset();
+#ifdef USE_QT5
+ endResetModel();
+#else
+ reset();
+#endif
}
else
{
@@ -195,9 +236,16 @@
{
if (index >= 0 && index < m_characters.size())
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_characters.removeAt(index);
m_fonts.removeAt(index);
- reset();
+#ifdef USE_QT5
+ endResetModel();
+#else
+ reset();
+#endif
return true;
}
// qDebug("CharTable::deleteOwnCharacter: no char deleted - logical error probably");
Modified: trunk/Scribus/scribus/chartablemodel.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/chartablemodel.h
==============================================================================
--- trunk/Scribus/scribus/chartablemodel.h (original)
+++ trunk/Scribus/scribus/chartablemodel.h Sun Mar 10 21:36:32 2013
@@ -9,6 +9,7 @@
#include <QAbstractTableModel>
#include <QStringList>
+#include <QMimeData>
#include "scribusapi.h"
Modified: trunk/Scribus/scribus/designer/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/designer/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/designer/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/designer/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -46,9 +46,15 @@
SET(SCRIBUS_SCTABLEWIDGET_PLUGIN "scribus_sctablewidget")
SET(SCRIBUS_SCTEXTBROWSER_PLUGIN "scribus_sctextbrowser")
-QT4_WRAP_CPP(SCRIBUS_SCRSPINBOX_PLUGIN_MOC_SOURCES ${SCRIBUS_SCRSPINBOX_PLUGIN_MOC_CLASSES})
-QT4_WRAP_CPP(SCRIBUS_SCTABLEWIDGET_PLUGIN_MOC_SOURCES ${SCRIBUS_SCTABLEWIDGET_PLUGIN_MOC_CLASSES})
-QT4_WRAP_CPP(SCRIBUS_SCTEXTBROWSER_PLUGIN_MOC_SOURCES ${SCRIBUS_SCTEXTBROWSER_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCRIBUS_SCRSPINBOX_PLUGIN_MOC_SOURCES ${SCRIBUS_SCRSPINBOX_PLUGIN_MOC_CLASSES})
+ QT5_WRAP_CPP(SCRIBUS_SCTABLEWIDGET_PLUGIN_MOC_SOURCES ${SCRIBUS_SCTABLEWIDGET_PLUGIN_MOC_CLASSES})
+ QT5_WRAP_CPP(SCRIBUS_SCTEXTBROWSER_PLUGIN_MOC_SOURCES ${SCRIBUS_SCTEXTBROWSER_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SCRIBUS_SCRSPINBOX_PLUGIN_MOC_SOURCES ${SCRIBUS_SCRSPINBOX_PLUGIN_MOC_CLASSES})
+ QT4_WRAP_CPP(SCRIBUS_SCTABLEWIDGET_PLUGIN_MOC_SOURCES ${SCRIBUS_SCTABLEWIDGET_PLUGIN_MOC_CLASSES})
+ QT4_WRAP_CPP(SCRIBUS_SCTEXTBROWSER_PLUGIN_MOC_SOURCES ${SCRIBUS_SCTEXTBROWSER_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SCRSPINBOX_PLUGIN} SHARED ${SCRIBUS_SCRSPINBOX_PLUGIN_SOURCES} ${SCRIBUS_SCRSPINBOX_PLUGIN_MOC_SOURCES})
TARGET_LINK_LIBRARIES(${SCRIBUS_SCRSPINBOX_PLUGIN}
Modified: trunk/Scribus/scribus/fontlistmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/fontlistmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/fontlistmodel.cpp (original)
+++ trunk/Scribus/scribus/fontlistmodel.cpp Sun Mar 10 21:36:32 2013
@@ -27,9 +27,16 @@
void FontListModel::setFonts(SCFonts f)
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_fonts = f;
m_font_values = m_fonts.values();
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
}
int FontListModel::rowCount(const QModelIndex&) const
Modified: trunk/Scribus/scribus/gtgettext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/gtgettext.cpp
==============================================================================
--- trunk/Scribus/scribus/gtgettext.cpp (original)
+++ trunk/Scribus/scribus/gtgettext.cpp Sun Mar 10 21:36:32 2013
@@ -235,7 +235,7 @@
// If gtplugin is NULL we failed to load the plugin. Report an error to the user and exit the method.
if (!gtplugin)
{
- qWarning("Failed to load plugin %s", pluginFilePath.toAscii().constData());
+ qWarning("Failed to load plugin %s", pluginFilePath.toLatin1().constData());
return;
} // if (!gtplugin)
@@ -263,7 +263,7 @@
} // if (!fp_GetText)
else
{
- qWarning("Failed to get GetText() from %s",pluginFilePath.toAscii().constData());
+ qWarning("Failed to get GetText() from %s",pluginFilePath.toLatin1().constData());
}
}
// GetText is not quite up to date vs styles, clean char formatting already specified at paragraph level
@@ -294,7 +294,7 @@
// if gtplugin is NULL we were unable to load the plugin. Return an error and exit the method.
if (!gtplugin)
{
- qWarning("Failed to load plugin %s", pluginFilePath.toAscii().constData());
+ qWarning("Failed to load plugin %s", pluginFilePath.toLatin1().constData());
return false;
}
// Attempt to resolve the plugin symbol to the importer name (FileFormatName)
@@ -303,7 +303,7 @@
// Report an error, unload the plugin, and exit the method.
if (!fp_FileFormatName)
{
- qWarning("Failed to get FileFormatName() from %s", pluginFilePath.toAscii().constData());
+ qWarning("Failed to get FileFormatName() from %s", pluginFilePath.toLatin1().constData());
PluginManager::unloadDLL(gtplugin);
return false;
}
@@ -313,7 +313,7 @@
// Report an error, unload the plugin, and exit the method.
if (!fp_FileExtensions)
{
- qWarning("Failed to get FileExtensions() from %s", pluginFilePath.toAscii().constData());
+ qWarning("Failed to get FileExtensions() from %s", pluginFilePath.toLatin1().constData());
PluginManager::unloadDLL(gtplugin);
return false;
}
Modified: trunk/Scribus/scribus/guidesmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/guidesmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/guidesmodel.cpp (original)
+++ trunk/Scribus/scribus/guidesmodel.cpp Sun Mar 10 21:36:32 2013
@@ -57,7 +57,7 @@
return pts2value(m_values.at(index.row()) - rule, m_docUnitIndex);
if (role == Qt::BackgroundColorRole && m_values.at(index.row()) == 0.0)
- return QVariant(Qt::red);
+ return QVariant(QColor(Qt::red));
return QVariant();
}
@@ -90,9 +90,16 @@
void GuidesModel::removeValues(const Guides & v)
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
foreach(double i, v)
m_values.removeAll(value2pts(i, m_docUnitIndex));
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
}
// bool GuidesModel::removeRows(int row, int count, const QModelIndex & parent)
@@ -119,18 +126,32 @@
void GuidesModel::insertRow()
{
// insertRows(rowCount(), 1);
+#ifdef USE_QT5
+ beginResetModel();
+#endif
if (m_values.contains(0.0))
return;
m_values.append(0.0);
qSort(m_values);
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
}
void GuidesModel::setValues(Guides values)
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
m_values = values;
qSort(m_values);
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
}
Guides GuidesModel::values()
@@ -140,10 +161,17 @@
void GuidesModel::unitChange(int docUnitIndex, int docUnitDecimals,double offset)
{
+#ifdef USE_QT5
+ beginResetModel();
+#endif
rule = offset;
m_docUnitIndex = docUnitIndex;
m_docUnitDecimals = docUnitDecimals;
+#ifdef USE_QT5
+ endResetModel();
+#else
reset();
+#endif
}
#if 0
Modified: trunk/Scribus/scribus/latexhelpers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/latexhelpers.cpp
==============================================================================
--- trunk/Scribus/scribus/latexhelpers.cpp (original)
+++ trunk/Scribus/scribus/latexhelpers.cpp Sun Mar 10 21:36:32 2013
@@ -50,7 +50,11 @@
int index = text.indexOf(rule->regex);
while (index >= 0) {
int length;
+#ifdef USE_QT5
+ if (rule->regex.captureCount() == 0)
+#else
if (rule->regex.numCaptures() == 0)
+#endif
{
length = rule->regex.matchedLength();
}
Modified: trunk/Scribus/scribus/menumanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/menumanager.cpp
==============================================================================
--- trunk/Scribus/scribus/menumanager.cpp (original)
+++ trunk/Scribus/scribus/menumanager.cpp Sun Mar 10 21:36:32 2013
@@ -56,7 +56,7 @@
bool retVal=false;
if (child==parent)
{
- qDebug("%s", QString("Cannot add %1 menu to %2 menu (itself)").arg(child, parent).toAscii().constData());
+ qDebug("%s", QString("Cannot add %1 menu to %2 menu (itself)").arg(child, parent).toLatin1().constData());
return false;
}
if ((menuList.contains(child) && menuList[child]!=NULL) &&
@@ -65,7 +65,6 @@
menuList.insert(child, menuList[child]);
retVal=menuList[parent]->insertSubMenu(menuList[child]);
}
-
return retVal;
}
Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Sun Mar 10 21:36:32 2013
@@ -106,7 +106,7 @@
htmlText.append( tr("Embedded Image") + "\n");
else
htmlText.append( tr("File:") + " " + fi.fileName() + "\n");
- htmlText.append( tr("Original PPI:") + " " + QString::number(qRound(pixm.imgInfo.xres))+" x "+QString::number(qRound(pixm.imgInfo.yres)) + "\n");
+ htmlText.append( tr("Original PPI:") + " " + QString::number(pixm.imgInfo.xres)+" x "+QString::number(pixm.imgInfo.yres) + "\n");
htmlText.append( tr("Actual PPI:") + " " + QString::number(qRound(72.0 / imageXScale()))+" x "+ QString::number(qRound(72.0 / imageYScale())) + "\n");
htmlText.append( tr("Size:") + " " + QString::number(OrigW) + " x " + QString::number(OrigH) + "\n");
htmlText.append( tr("Colorspace:") + " ");
@@ -378,7 +378,7 @@
oPpiCT->setText( tr("Original PPI:"));
infoGroupLayout->addWidget( oPpiCT, 2, 0, Qt::AlignRight );
- oPpiT->setText(QString::number(qRound(pixm.imgInfo.xres))+" x "+QString::number(qRound(pixm.imgInfo.yres)));
+ oPpiT->setText(QString::number(pixm.imgInfo.xres)+" x "+QString::number(pixm.imgInfo.yres));
infoGroupLayout->addWidget( oPpiT, 2, 1 );
aPpiCT->setText( tr("Actual PPI:"));
@@ -470,7 +470,7 @@
htmlText.append( tr("Embedded Image") + "<br/>");
else
htmlText.append( tr("File:") + " " + fi.fileName() + "<br/>");
- htmlText.append( tr("Original PPI:") + " " + QString::number(qRound(pixm.imgInfo.xres))+" x "+QString::number(qRound(pixm.imgInfo.yres)) + "<br/>");
+ htmlText.append( tr("Original PPI:") + " " + QString::number(pixm.imgInfo.xres)+" x "+QString::number(pixm.imgInfo.yres) + "<br/>");
htmlText.append( tr("Actual PPI:") + " " + QString::number(qRound(72.0 / imageXScale()))+" x "+ QString::number(qRound(72.0 / imageYScale())) + "<br/>");
htmlText.append( tr("Colorspace:") + " ");
QString cSpace;
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Sun Mar 10 21:36:32 2013
@@ -113,7 +113,7 @@
{
QList<uint> Segs;
QPolygon Clip2 = FlattenPath(docItem->imageClip, Segs);
- res = QRegion(pp.map(Clip2)).intersect(QRegion(pp.map(docItem->Clip)));
+ res = QRegion(pp.map(Clip2)).intersected(QRegion(pp.map(docItem->Clip)));
}
else if ((docItem->textFlowUsesContourLine()) && (docItem->ContourLine.size() != 0))
{
@@ -689,7 +689,7 @@
// check if something gets in the way
QRegion lineI = shape.intersected (p.boundingRect());
// if the intersection only has 1 rectangle, then nothing gets in the way
- if (lineI.numRects() == 1)
+ if (lineI.rectCount() == 1)
{
int cPos = static_cast<int>(ceil(StartX + morespace));
QRect cRect (QPoint(cPos, yAsc), QPoint(cPos, yDesc));
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Sun Mar 10 21:36:32 2013
@@ -1306,7 +1306,7 @@
PutDoc("[ ");
for (int ww = 0; ww < glyphWidths.count(); ++ww)
{
- PutDoc(QString::number(qRound(glyphWidths[ww]))+" ");
+ PutDoc(QString::number(glyphWidths[ww])+" ");
}
PutDoc("]\nendobj\n");
uint fontCharProcs = newObject();
Modified: trunk/Scribus/scribus/pdflib_core.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/pdflib_core.h
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.h (original)
+++ trunk/Scribus/scribus/pdflib_core.h Sun Mar 10 21:36:32 2013
@@ -83,7 +83,7 @@
};
bool PDF_Begin_Doc(const QString& fn, SCFonts &AllFonts, QMap<QString, QMap<uint, FPointArray> > DocFonts, BookMView* vi);
- void PDF_Begin_Page(const ScPage* pag, QPixmap pm = 0);
+ void PDF_Begin_Page(const ScPage* pag, QPixmap pm);
void PDF_End_Page(int physPage);
bool PDF_TemplatePage(const ScPage* pag, bool clip = false);
bool PDF_ProcessPage(const ScPage* pag, uint PNr, bool clip = false);
Modified: trunk/Scribus/scribus/plugins/barcodegenerator/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/barcodegenerator/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_BARCODEGENERATOR_PLUGIN "barcodegenerator")
-QT4_WRAP_UI(BARCODEGENERATOR_PLUGIN_UI_SOURCES ${BARCODEGENERATOR_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(BARCODEGENERATOR_PLUGIN_MOC_SOURCES ${BARCODEGENERATOR_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(BARCODEGENERATOR_PLUGIN_UI_SOURCES ${BARCODEGENERATOR_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(BARCODEGENERATOR_PLUGIN_MOC_SOURCES ${BARCODEGENERATOR_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(BARCODEGENERATOR_PLUGIN_UI_SOURCES ${BARCODEGENERATOR_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(BARCODEGENERATOR_PLUGIN_MOC_SOURCES ${BARCODEGENERATOR_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_BARCODEGENERATOR_PLUGIN} MODULE ${BARCODEGENERATOR_PLUGIN_SOURCES} ${BARCODEGENERATOR_PLUGIN_MOC_SOURCES} ${BARCODEGENERATOR_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/colorwheel/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/colorwheel/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/colorwheel/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -21,8 +21,13 @@
SET(SCRIBUS_COLORWHEEL_PLUGIN "colorwheel")
-QT4_WRAP_UI(COLORWHEEL_PLUGIN_UI_SOURCES ${COLORWHEEL_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(COLORWHEEL_PLUGIN_MOC_SOURCES ${COLORWHEEL_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(COLORWHEEL_PLUGIN_UI_SOURCES ${COLORWHEEL_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(COLORWHEEL_PLUGIN_MOC_SOURCES ${COLORWHEEL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(COLORWHEEL_PLUGIN_UI_SOURCES ${COLORWHEEL_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(COLORWHEEL_PLUGIN_MOC_SOURCES ${COLORWHEEL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_COLORWHEEL_PLUGIN} MODULE ${COLORWHEEL_PLUGIN_SOURCES} ${COLORWHEEL_PLUGIN_MOC_SOURCES} ${COLORWHEEL_PLUGIN_UI_CPP} ${COLORWHEEL_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp (original)
+++ trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp Sun Mar 10 21:36:32 2013
@@ -86,7 +86,7 @@
currDoc=ScCore->primaryMainWindow()->doc;
if (currDoc==0)
return false;
- CWDialog *dlg = new CWDialog(currDoc->scMW(), currDoc, "dlg", true, 0);
+ CWDialog *dlg = new CWDialog(currDoc->scMW(), currDoc, "dlg", true);
if (dlg)
{
dlg->exec();
Modified: trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp (original)
+++ trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp Sun Mar 10 21:36:32 2013
@@ -20,8 +20,8 @@
#include "util_color.h"
-CWDialog::CWDialog(QWidget* parent, ScribusDoc* doc, const char* name, bool modal, Qt::WFlags fl)
- : QDialog (parent, fl),
+CWDialog::CWDialog(QWidget* parent, ScribusDoc* doc, const char* name, bool modal)
+ : QDialog (parent),
m_Doc(doc)
{
setupUi(this);
Modified: trunk/Scribus/scribus/plugins/colorwheel/cwdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/colorwheel/cwdialog.h
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/cwdialog.h (original)
+++ trunk/Scribus/scribus/plugins/colorwheel/cwdialog.h Sun Mar 10 21:36:32 2013
@@ -31,7 +31,7 @@
{
Q_OBJECT
public:
- CWDialog( QWidget* parent = 0, ScribusDoc* doc = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
+ CWDialog(QWidget* parent = 0, ScribusDoc* doc = 0, const char* name = 0, bool modal = false);
~CWDialog();
private:
/** \brief Configuration structure */
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_SCR12FORMAT_FL_PLUGIN "scribus12format")
-QT4_WRAP_CPP(SCR12FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR12FORMAT_FL_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCR12FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR12FORMAT_FL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SCR12FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR12FORMAT_FL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SCR12FORMAT_FL_PLUGIN} MODULE ${SCR12FORMAT_FL_PLUGIN_SOURCES} ${SCR12FORMAT_FL_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_SCR134FORMAT_FL_PLUGIN "scribus134format")
-QT4_WRAP_CPP(SCR134FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR134FORMAT_FL_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCR134FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR134FORMAT_FL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SCR134FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR134FORMAT_FL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SCR134FORMAT_FL_PLUGIN} MODULE ${SCR134FORMAT_FL_PLUGIN_SOURCES} ${SCR134FORMAT_FL_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_SCR13FORMAT_FL_PLUGIN "scribus13format")
-QT4_WRAP_CPP(SCR13FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR13FORMAT_FL_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCR13FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR13FORMAT_FL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SCR13FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR13FORMAT_FL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SCR13FORMAT_FL_PLUGIN} MODULE ${SCR13FORMAT_FL_PLUGIN_SOURCES} ${SCR13FORMAT_FL_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -16,7 +16,11 @@
SET(SCRIBUS_SCR150FORMAT_FL_PLUGIN "scribus150format")
-QT4_WRAP_CPP(SCR150FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR150FORMAT_FL_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCR150FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR150FORMAT_FL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SCR150FORMAT_FL_PLUGIN_MOC_SOURCES ${SCR150FORMAT_FL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SCR150FORMAT_FL_PLUGIN} MODULE ${SCR150FORMAT_FL_PLUGIN_SOURCES} ${SCR150FORMAT_FL_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/fontpreview/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/fontpreview/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/fontpreview/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/fontpreview/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_FONTPREVIEW_PLUGIN "fontpreview")
-QT4_WRAP_UI(FONTPREVIEW_PLUGIN_UI_SOURCES ${FONTPREVIEW_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(FONTPREVIEW_PLUGIN_MOC_SOURCES ${FONTPREVIEW_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(FONTPREVIEW_PLUGIN_UI_SOURCES ${FONTPREVIEW_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(FONTPREVIEW_PLUGIN_MOC_SOURCES ${FONTPREVIEW_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(FONTPREVIEW_PLUGIN_UI_SOURCES ${FONTPREVIEW_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(FONTPREVIEW_PLUGIN_MOC_SOURCES ${FONTPREVIEW_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_FONTPREVIEW_PLUGIN} MODULE ${FONTPREVIEW_PLUGIN_SOURCES} ${FONTPREVIEW_PLUGIN_MOC_SOURCES} ${FONTPREVIEW_PLUGIN_UI_CPP} ${FONTPREVIEW_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/gettext/csvim/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/gettext/csvim/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/csvim/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/gettext/csvim/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_CSV_GT_PLUGIN "csvim")
-QT4_WRAP_CPP(CSV_GT_PLUGIN_MOC_SOURCES ${CSV_GT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(CSV_GT_PLUGIN_MOC_SOURCES ${CSV_GT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(CSV_GT_PLUGIN_MOC_SOURCES ${CSV_GT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_CSV_GT_PLUGIN} MODULE ${CSV_GT_PLUGIN_SOURCES} ${CSV_GT_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/gettext/docim/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/gettext/docim/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/docim/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/gettext/docim/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_DOC_GT_PLUGIN "docim")
-QT4_WRAP_CPP(DOC_GT_PLUGIN_MOC_SOURCES ${DOC_GT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(DOC_GT_PLUGIN_MOC_SOURCES ${DOC_GT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(DOC_GT_PLUGIN_MOC_SOURCES ${DOC_GT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_DOC_GT_PLUGIN} MODULE ${DOC_GT_PLUGIN_SOURCES} ${DOC_GT_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/gettext/htmlim/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/gettext/htmlim/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/htmlim/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/gettext/htmlim/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -14,7 +14,11 @@
SET(SCRIBUS_HTML_GT_PLUGIN "htmlim")
-QT4_WRAP_CPP(HTML_GT_PLUGIN_MOC_SOURCES ${HTML_GT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(HTML_GT_PLUGIN_MOC_SOURCES ${HTML_GT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(HTML_GT_PLUGIN_MOC_SOURCES ${HTML_GT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_HTML_GT_PLUGIN} MODULE ${HTML_GT_PLUGIN_SOURCES} ${HTML_GT_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/gettext/odtim/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/gettext/odtim/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odtim/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/gettext/odtim/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -16,7 +16,11 @@
SET(SCRIBUS_ODT_IM_PLUGIN "odtimplugin")
-QT4_WRAP_CPP(ODT_IM_PLUGIN_MOC_SOURCES ${ODT_IM_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(ODT_IM_PLUGIN_MOC_SOURCES ${ODT_IM_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(ODT_IM_PLUGIN_MOC_SOURCES ${ODT_IM_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_ODT_IM_PLUGIN} MODULE ${ODT_IM_PLUGIN_SOURCES} ${ODT_IM_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -16,7 +16,11 @@
SET(SCRIBUS_SXW_IM_PLUGIN "sxwimplugin")
-QT4_WRAP_CPP(SXW_IM_PLUGIN_MOC_SOURCES ${SXW_IM_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SXW_IM_PLUGIN_MOC_SOURCES ${SXW_IM_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SXW_IM_PLUGIN_MOC_SOURCES ${SXW_IM_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SXW_IM_PLUGIN} MODULE ${SXW_IM_PLUGIN_SOURCES} ${SXW_IM_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/gettext/textfilter/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/gettext/textfilter/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/textfilter/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/gettext/textfilter/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -16,7 +16,11 @@
SET(SCRIBUS_TEXTFILTER_GT_PLUGIN "textfilterplugin")
-QT4_WRAP_CPP(TEXTFILTER_GT_PLUGIN_MOC_SOURCES ${TEXTFILTER_GT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(TEXTFILTER_GT_PLUGIN_MOC_SOURCES ${TEXTFILTER_GT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(TEXTFILTER_GT_PLUGIN_MOC_SOURCES ${TEXTFILTER_GT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_TEXTFILTER_GT_PLUGIN} MODULE ${TEXTFILTER_GT_PLUGIN_SOURCES} ${TEXTFILTER_GT_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -17,7 +17,11 @@
SET(SCRIBUS_XTG_IM_PLUGIN "xtgimplugin")
-QT4_WRAP_CPP(XTG_IM_PLUGIN_MOC_SOURCES ${XTG_IM_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(XTG_IM_PLUGIN_MOC_SOURCES ${XTG_IM_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(XTG_IM_PLUGIN_MOC_SOURCES ${XTG_IM_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_XTG_IM_PLUGIN} MODULE ${XTG_IM_PLUGIN_SOURCES} ${XTG_IM_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/ai/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/ai/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/ai/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -22,7 +22,11 @@
SET(SCRIBUS_IMPORTAI_PLUGIN "importai")
-QT4_WRAP_CPP(IMPORTAI_PLUGIN_MOC_SOURCES ${IMPORTAI_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTAI_PLUGIN_MOC_SOURCES ${IMPORTAI_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTAI_PLUGIN_MOC_SOURCES ${IMPORTAI_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTAI_PLUGIN} MODULE ${IMPORTAI_PLUGIN_SOURCES} ${IMPORTAI_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/cgm/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/cgm/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTCGM_PLUGIN "importcgm")
-QT4_WRAP_CPP(IMPORTCGM_PLUGIN_MOC_SOURCES ${IMPORTCGM_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTCGM_PLUGIN_MOC_SOURCES ${IMPORTCGM_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTCGM_PLUGIN_MOC_SOURCES ${IMPORTCGM_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTCGM_PLUGIN} MODULE ${IMPORTCGM_PLUGIN_SOURCES} ${IMPORTCGM_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/cvg/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/cvg/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/cvg/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTCVG_PLUGIN "importcvg")
-QT4_WRAP_CPP(IMPORTCVG_PLUGIN_MOC_SOURCES ${IMPORTCVG_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTCVG_PLUGIN_MOC_SOURCES ${IMPORTCVG_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTCVG_PLUGIN_MOC_SOURCES ${IMPORTCVG_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTCVG_PLUGIN} MODULE ${IMPORTCVG_PLUGIN_SOURCES} ${IMPORTCVG_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/drw/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/drw/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/drw/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTDRW_PLUGIN "importdrw")
-QT4_WRAP_CPP(IMPORTDRW_PLUGIN_MOC_SOURCES ${IMPORTDRW_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTDRW_PLUGIN_MOC_SOURCES ${IMPORTDRW_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTDRW_PLUGIN_MOC_SOURCES ${IMPORTDRW_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTDRW_PLUGIN} MODULE ${IMPORTDRW_PLUGIN_SOURCES} ${IMPORTDRW_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/idml/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/idml/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/idml/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTIDML_PLUGIN "importidml")
-QT4_WRAP_CPP(IMPORTIDML_PLUGIN_MOC_SOURCES ${IMPORTIDML_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTIDML_PLUGIN_MOC_SOURCES ${IMPORTIDML_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTIDML_PLUGIN_MOC_SOURCES ${IMPORTIDML_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTIDML_PLUGIN} MODULE ${IMPORTIDML_PLUGIN_SOURCES} ${IMPORTIDML_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/oodraw/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/oodraw/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -14,7 +14,11 @@
SET(SCRIBUS_OODRAW_FL_PLUGIN "oodrawimp")
-QT4_WRAP_CPP(OODRAW_FL_PLUGIN_MOC_SOURCES ${OODRAW_FL_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(OODRAW_FL_PLUGIN_MOC_SOURCES ${OODRAW_FL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(OODRAW_FL_PLUGIN_MOC_SOURCES ${OODRAW_FL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_OODRAW_FL_PLUGIN} MODULE ${OODRAW_FL_PLUGIN_SOURCES} ${OODRAW_FL_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/pct/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/pct/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/pct/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTPCT_PLUGIN "importpct")
-QT4_WRAP_CPP(IMPORTPCT_PLUGIN_MOC_SOURCES ${IMPORTPCT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTPCT_PLUGIN_MOC_SOURCES ${IMPORTPCT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTPCT_PLUGIN_MOC_SOURCES ${IMPORTPCT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTPCT_PLUGIN} MODULE ${IMPORTPCT_PLUGIN_SOURCES} ${IMPORTPCT_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/pdf/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/pdf/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -31,8 +31,13 @@
SET(SCRIBUS_IMPORTPDF_PLUGIN "importpdf")
-QT4_WRAP_UI(IMPORTPDF_PLUGIN_UI_SOURCES ${IMPORTPDF_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(IMPORTPDF_PLUGIN_MOC_SOURCES ${IMPORTPDF_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(IMPORTPDF_PLUGIN_UI_SOURCES ${IMPORTPDF_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(IMPORTPDF_PLUGIN_MOC_SOURCES ${IMPORTPDF_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(IMPORTPDF_PLUGIN_UI_SOURCES ${IMPORTPDF_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(IMPORTPDF_PLUGIN_MOC_SOURCES ${IMPORTPDF_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTPDF_PLUGIN} MODULE ${IMPORTPDF_PLUGIN_SOURCES} ${IMPORTPDF_PLUGIN_MOC_SOURCES} ${IMPORTPDF_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/ps/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/ps/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ps/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/ps/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -22,7 +22,11 @@
SET(SCRIBUS_IMPORTPS_PLUGIN "importps")
-QT4_WRAP_CPP(IMPORTPS_PLUGIN_MOC_SOURCES ${IMPORTPS_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTPS_PLUGIN_MOC_SOURCES ${IMPORTPS_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTPS_PLUGIN_MOC_SOURCES ${IMPORTPS_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTPS_PLUGIN} MODULE ${IMPORTPS_PLUGIN_SOURCES} ${IMPORTPS_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/shape/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/shape/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/shape/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTSHAPE_PLUGIN "importshape")
-QT4_WRAP_CPP(IMPORTSHAPE_PLUGIN_MOC_SOURCES ${IMPORTSHAPE_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTSHAPE_PLUGIN_MOC_SOURCES ${IMPORTSHAPE_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTSHAPE_PLUGIN_MOC_SOURCES ${IMPORTSHAPE_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTSHAPE_PLUGIN} MODULE ${IMPORTSHAPE_PLUGIN_SOURCES} ${IMPORTSHAPE_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/sml/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/sml/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/sml/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTSML_PLUGIN "importsml")
-QT4_WRAP_CPP(IMPORTSML_PLUGIN_MOC_SOURCES ${IMPORTSML_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTSML_PLUGIN_MOC_SOURCES ${IMPORTSML_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTSML_PLUGIN_MOC_SOURCES ${IMPORTSML_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTSML_PLUGIN} MODULE ${IMPORTSML_PLUGIN_SOURCES} ${IMPORTSML_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/svg/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/svg/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/svg/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_IMPORTSVG_PLUGIN "svgimplugin")
-QT4_WRAP_CPP(IMPORTSVG_PLUGIN_MOC_SOURCES ${IMPORTSVG_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTSVG_PLUGIN_MOC_SOURCES ${IMPORTSVG_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTSVG_PLUGIN_MOC_SOURCES ${IMPORTSVG_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTSVG_PLUGIN} MODULE ${IMPORTSVG_PLUGIN_SOURCES} ${IMPORTSVG_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/uniconvertor/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/uniconvertor/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/uniconvertor/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/uniconvertor/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_IMPORTUNICONVERTOR_PLUGIN "uniconvertorplugin")
-QT4_WRAP_CPP(IMPORTUNICONVERTOR_PLUGIN_MOC_SOURCES ${IMPORTUNICONVERTOR_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTUNICONVERTOR_PLUGIN_MOC_SOURCES ${IMPORTUNICONVERTOR_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTUNICONVERTOR_PLUGIN_MOC_SOURCES ${IMPORTUNICONVERTOR_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTUNICONVERTOR_PLUGIN} MODULE ${IMPORTUNICONVERTOR_PLUGIN_SOURCES} ${IMPORTUNICONVERTOR_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/wmf/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/wmf/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -16,7 +16,11 @@
SET(SCRIBUS_IMPORTWMF_PLUGIN "wmfimplugin")
-QT4_WRAP_CPP(IMPORTWMF_PLUGIN_MOC_SOURCES ${IMPORTWMF_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTWMF_PLUGIN_MOC_SOURCES ${IMPORTWMF_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTWMF_PLUGIN_MOC_SOURCES ${IMPORTWMF_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTWMF_PLUGIN} MODULE ${IMPORTWMF_PLUGIN_SOURCES} ${IMPORTWMF_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp Sun Mar 10 21:36:32 2013
@@ -737,7 +737,7 @@
str += param;
str += " ";
}
- cerr << str.toAscii().data() << endl;
+ cerr << str.toLatin1().data() << endl;
}
}
return elements;
Modified: trunk/Scribus/scribus/plugins/import/wpg/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/wpg/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/wpg/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -12,7 +12,11 @@
importwpgplugin.cpp
)
SET(SCRIBUS_IMPORTWPG_PLUGIN "importwpg")
-QT4_WRAP_CPP(IMPORTWPG_PLUGIN_MOC_SOURCES ${IMPORTWPG_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTWPG_PLUGIN_MOC_SOURCES ${IMPORTWPG_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTWPG_PLUGIN_MOC_SOURCES ${IMPORTWPG_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTWPG_PLUGIN} MODULE ${IMPORTWPG_PLUGIN_SOURCES} ${IMPORTWPG_PLUGIN_MOC_SOURCES})
TARGET_LINK_LIBRARIES(${SCRIBUS_IMPORTWPG_PLUGIN} ${PLUGIN_LIBRARIES})
INSTALL(TARGETS ${SCRIBUS_IMPORTWPG_PLUGIN}
Modified: trunk/Scribus/scribus/plugins/import/xar/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/xar/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/xar/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -17,7 +17,11 @@
SET(SCRIBUS_IMPORTXAR_PLUGIN "importxar")
-QT4_WRAP_CPP(IMPORTXAR_PLUGIN_MOC_SOURCES ${IMPORTXAR_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTXAR_PLUGIN_MOC_SOURCES ${IMPORTXAR_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTXAR_PLUGIN_MOC_SOURCES ${IMPORTXAR_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTXAR_PLUGIN} MODULE ${IMPORTXAR_PLUGIN_SOURCES} ${IMPORTXAR_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/import/xfig/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/import/xfig/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/xfig/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_IMPORTXFIG_PLUGIN "importxfig")
-QT4_WRAP_CPP(IMPORTXFIG_PLUGIN_MOC_SOURCES ${IMPORTXFIG_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(IMPORTXFIG_PLUGIN_MOC_SOURCES ${IMPORTXFIG_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(IMPORTXFIG_PLUGIN_MOC_SOURCES ${IMPORTXFIG_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPORTXFIG_PLUGIN} MODULE ${IMPORTXFIG_PLUGIN_SOURCES} ${IMPORTXFIG_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/imposition/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/imposition/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/imposition/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/imposition/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_IMPOSITION_PLUGIN "imposition")
-QT4_WRAP_UI(IMPOSITION_PLUGIN_UI_SOURCES ${IMPOSITION_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(IMPOSITION_PLUGIN_MOC_SOURCES ${IMPOSITION_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(IMPOSITION_PLUGIN_UI_SOURCES ${IMPOSITION_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(IMPOSITION_PLUGIN_MOC_SOURCES ${IMPOSITION_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(IMPOSITION_PLUGIN_UI_SOURCES ${IMPOSITION_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(IMPOSITION_PLUGIN_MOC_SOURCES ${IMPOSITION_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_IMPOSITION_PLUGIN} MODULE ${IMPOSITION_PLUGIN_SOURCES} ${IMPOSITION_PLUGIN_MOC_SOURCES} ${IMPOSITION_PLUGIN_UI_CPP} ${IMPOSITION_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/myplugin/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/myplugin/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/myplugin/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/myplugin/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -15,7 +15,11 @@
SET(SCRIBUS_MY_PLUGIN "myplugin")
-QT4_WRAP_CPP(MY_PLUGIN_MOC_SOURCES ${MY_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(MY_PLUGIN_MOC_SOURCES ${MY_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(MY_PLUGIN_MOC_SOURCES ${MY_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_MY_PLUGIN} MODULE ${MY_PLUGIN_SOURCES} ${MY_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/newfromtemplateplugin/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/newfromtemplateplugin/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/newfromtemplateplugin/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/newfromtemplateplugin/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -22,8 +22,13 @@
SET(SCRIBUS_NEWFROMTEMPLATE_PLUGIN "newfromtemplateplugin")
-QT4_WRAP_UI(NEWFROMTEMPLATE_PLUGIN_UI_SOURCES ${NEWFROMTEMPLATE_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(NEWFROMTEMPLATE_PLUGIN_MOC_SOURCES ${NEWFROMTEMPLATE_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(NEWFROMTEMPLATE_PLUGIN_UI_SOURCES ${NEWFROMTEMPLATE_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(NEWFROMTEMPLATE_PLUGIN_MOC_SOURCES ${NEWFROMTEMPLATE_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(NEWFROMTEMPLATE_PLUGIN_UI_SOURCES ${NEWFROMTEMPLATE_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(NEWFROMTEMPLATE_PLUGIN_MOC_SOURCES ${NEWFROMTEMPLATE_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_NEWFROMTEMPLATE_PLUGIN} MODULE
${NEWFROMTEMPLATE_PLUGIN_SOURCES}
Modified: trunk/Scribus/scribus/plugins/picbrowser/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/picbrowser/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -34,8 +34,13 @@
SET(SCRIBUS_PICTUREBROWSER_PLUGIN "picturebrowser")
-QT4_WRAP_UI(PICTUREBROWSER_PLUGIN_UI_SOURCES ${PICTUREBROWSER_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(PICTUREBROWSER_PLUGIN_MOC_SOURCES ${PICTUREBROWSER_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(PICTUREBROWSER_PLUGIN_UI_SOURCES ${PICTUREBROWSER_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(PICTUREBROWSER_PLUGIN_MOC_SOURCES ${PICTUREBROWSER_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(PICTUREBROWSER_PLUGIN_UI_SOURCES ${PICTUREBROWSER_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(PICTUREBROWSER_PLUGIN_MOC_SOURCES ${PICTUREBROWSER_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_PICTUREBROWSER_PLUGIN} MODULE ${PICTUREBROWSER_PLUGIN_SOURCES}
${PICTUREBROWSER_PLUGIN_MOC_SOURCES} ${PICTUREBROWSER_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/picbrowser/loadimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/picbrowser/loadimage.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/loadimage.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/loadimage.cpp Sun Mar 10 21:36:32 2013
@@ -153,8 +153,8 @@
( *imgInfo ).height = iy;
( *imgInfo ).type = image.imgInfo.type;
( *imgInfo ).colorspace = image.imgInfo.colorspace;
- ( *imgInfo ).xdpi = qRound ( image.imgInfo.xres );
- ( *imgInfo ).ydpi = qRound ( image.imgInfo.yres );
+ ( *imgInfo ).xdpi = image.imgInfo.xres;
+ ( *imgInfo ).ydpi = image.imgInfo.yres;
( *imgInfo ).layers = image.imgInfo.layerInfo.size();
( *imgInfo ).embedded = image.imgInfo.isEmbedded;
( *imgInfo ).profileName = image.imgInfo.profileName;
Modified: trunk/Scribus/scribus/plugins/pixmapexport/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/pixmapexport/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/pixmapexport/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/pixmapexport/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_PIXMAPEXPORT_PLUGIN "scribusexportpixmap")
-QT4_WRAP_UI(SCRIBUS_PIXMAPEXPORT_PLUGIN_UI_SOURCES ${SCRIBUS_PIXMAPEXPORT_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(SCRIBUS_PIXMAPEXPORT_PLUGIN_MOC_SOURCES ${SCRIBUS_PIXMAPEXPORT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(SCRIBUS_PIXMAPEXPORT_PLUGIN_UI_SOURCES ${SCRIBUS_PIXMAPEXPORT_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(SCRIBUS_PIXMAPEXPORT_PLUGIN_MOC_SOURCES ${SCRIBUS_PIXMAPEXPORT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(SCRIBUS_PIXMAPEXPORT_PLUGIN_UI_SOURCES ${SCRIBUS_PIXMAPEXPORT_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(SCRIBUS_PIXMAPEXPORT_PLUGIN_MOC_SOURCES ${SCRIBUS_PIXMAPEXPORT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_PIXMAPEXPORT_PLUGIN} MODULE ${SCRIBUS_PIXMAPEXPORT_PLUGIN_SOURCES} ${SCRIBUS_PIXMAPEXPORT_PLUGIN_MOC_SOURCES} ${SCRIBUS_PIXMAPEXPORT_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/saveastemplateplugin/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/saveastemplateplugin/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/saveastemplateplugin/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/saveastemplateplugin/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_SAVEASTEMPLATE_PLUGIN "saveastemplateplugin")
-QT4_WRAP_UI(SAVEASTEMPLATE_PLUGIN_UI_SOURCES ${SAVEASTEMPLATE_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(SAVEASTEMPLATE_PLUGIN_MOC_SOURCES ${SAVEASTEMPLATE_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(SAVEASTEMPLATE_PLUGIN_UI_SOURCES ${SAVEASTEMPLATE_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(SAVEASTEMPLATE_PLUGIN_MOC_SOURCES ${SAVEASTEMPLATE_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(SAVEASTEMPLATE_PLUGIN_UI_SOURCES ${SAVEASTEMPLATE_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(SAVEASTEMPLATE_PLUGIN_MOC_SOURCES ${SAVEASTEMPLATE_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SAVEASTEMPLATE_PLUGIN} MODULE ${SAVEASTEMPLATE_PLUGIN_SOURCES}
${SAVEASTEMPLATE_PLUGIN_MOC_SOURCES} ${SAVEASTEMPLATE_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/scripter/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scripter/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/scripter/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -54,7 +54,11 @@
SET(SCRIBUS_SCRIPTER_PLUGIN "scripter")
-QT4_WRAP_CPP(SCRIPTER_PLUGIN_MOC_SOURCES ${SCRIPTER_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCRIPTER_PLUGIN_MOC_SOURCES ${SCRIPTER_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SCRIPTER_PLUGIN_MOC_SOURCES ${SCRIPTER_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SCRIPTER_PLUGIN} MODULE ${SCRIPTER_PLUGIN_SOURCES} ${SCRIPTER_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/scriptplugin/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scriptplugin/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -57,8 +57,13 @@
SET(SCRIBUS_SCRIPTER_PLUGIN "scriptplugin")
-QT4_WRAP_UI(SCRIPTER_PLUGIN_UI_SOURCES ${SCRIPTER_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(SCRIPTER_PLUGIN_MOC_SOURCES ${SCRIPTER_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(SCRIPTER_PLUGIN_UI_SOURCES ${SCRIPTER_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(SCRIPTER_PLUGIN_MOC_SOURCES ${SCRIPTER_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(SCRIPTER_PLUGIN_UI_SOURCES ${SCRIPTER_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(SCRIPTER_PLUGIN_MOC_SOURCES ${SCRIPTER_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SCRIPTER_PLUGIN} MODULE
${SCRIPTER_PLUGIN_SOURCES}
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp Sun Mar 10 21:36:32 2013
@@ -433,14 +433,14 @@
// FIXME: should raise an exception instead of mangling the string when
// out of charset chars present.
QString utfString = QString::fromUtf8(PyString_AsString(objValue));
- success = obj->setProperty(propertyName, utfString.toAscii());
+ success = obj->setProperty(propertyName, utfString.toLatin1());
}
else if (PyUnicode_Check(objValue))
{
// Get a pointer to the internal buffer of the Py_Unicode object, which is UCS2 formatted
const unsigned short * utf16Data = (const unsigned short *)PyUnicode_AS_UNICODE(objValue);
// and make a new QString from it (the string is copied)
- success = obj->setProperty(propertyName, QString::fromUtf16(utf16Data).toAscii());
+ success = obj->setProperty(propertyName, QString::fromUtf16(utf16Data).toLatin1());
}
else
matched = false;
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp Sun Mar 10 21:36:32 2013
@@ -277,7 +277,7 @@
tf = fi.path()+"/"+fi.baseName()+".pdf";
}
PyObject *file = NULL;
- file = PyString_FromString(tf.toAscii());
+ file = PyString_FromString(tf.toLatin1());
if (file){
Py_DECREF(self->file);
self->file = file;
@@ -303,9 +303,9 @@
QList<QString>::Iterator itef;
for (itef = tmpEm.begin(); itef != tmpEm.end(); ++itef) {
// AV: dunno what this is for, but it looks as if it's the only place where HasMetrics is used...
-// if (PrefsManager::instance()->appPrefs.AvailFonts[(*itef).toAscii()]->HasMetrics) {
+// if (PrefsManager::instance()->appPrefs.AvailFonts[(*itef).toLatin1()]->HasMetrics) {
PyObject *tmp= NULL;
- tmp = PyString_FromString((*itef).toAscii());
+ tmp = PyString_FromString((*itef).toLatin1());
if (tmp) {
PyList_Append(self->fonts, tmp);
// do i need Py_DECREF(tmp) here?
@@ -443,7 +443,7 @@
QMap<QString,LPIData>::Iterator it = ScCore->primaryMainWindow()->doc->pdfOptions().LPISettings.begin();
while (it != ScCore->primaryMainWindow()->doc->pdfOptions().LPISettings.end()) {
PyObject *tmp;
- tmp = Py_BuildValue(const_cast<char*>("[siii]"), it.key().toAscii().constData(), it.value().Frequency, it.value().Angle, it.value().SpotFunc);
+ tmp = Py_BuildValue(const_cast<char*>("[siii]"), it.key().toLatin1().constData(), it.value().Frequency, it.value().Angle, it.value().SpotFunc);
if (!tmp) {
PyErr_SetString(PyExc_SystemError, "Can not initialize 'lpival' attribute");
return -1;
@@ -456,7 +456,7 @@
self->lpival = lpival;
// set owner's password
PyObject *owner = NULL;
- owner = PyString_FromString(ScCore->primaryMainWindow()->doc->pdfOptions().PassOwner.toAscii());
+ owner = PyString_FromString(ScCore->primaryMainWindow()->doc->pdfOptions().PassOwner.toLatin1());
if (owner){
Py_DECREF(self->owner);
self->owner = owner;
@@ -466,7 +466,7 @@
}
// set user'a password
PyObject *user = NULL;
- user = PyString_FromString(ScCore->primaryMainWindow()->doc->pdfOptions().PassUser.toAscii());
+ user = PyString_FromString(ScCore->primaryMainWindow()->doc->pdfOptions().PassUser.toLatin1());
if (user){
Py_DECREF(self->user);
self->user = user;
@@ -496,7 +496,7 @@
if (!ScCore->InputProfiles.contains(tp))
tp = ScCore->primaryMainWindow()->view->Doc->cmsSettings().DefaultSolidColorRGBProfile;
PyObject *solidpr = NULL;
- solidpr = PyString_FromString(tp.toAscii());
+ solidpr = PyString_FromString(tp.toLatin1());
if (solidpr){
Py_DECREF(self->solidpr);
self->solidpr = solidpr;
@@ -508,7 +508,7 @@
if (!ScCore->InputProfiles.contains(tp2))
tp2 = ScCore->primaryMainWindow()->view->Doc->cmsSettings().DefaultSolidColorRGBProfile;
PyObject *imagepr = NULL;
- imagepr = PyString_FromString(tp2.toAscii());
+ imagepr = PyString_FromString(tp2.toLatin1());
if (imagepr){
Py_DECREF(self->imagepr);
self->imagepr = imagepr;
@@ -520,7 +520,7 @@
if (!ScCore->PDFXProfiles.contains(tp3))
tp3 = ScCore->primaryMainWindow()->view->Doc->cmsSettings().DefaultPrinterProfile;
PyObject *printprofc = NULL;
- printprofc = PyString_FromString(tp3.toAscii());
+ printprofc = PyString_FromString(tp3.toLatin1());
if (printprofc){
Py_DECREF(self->printprofc);
self->printprofc = printprofc;
@@ -530,7 +530,7 @@
}
QString tinfo = ScCore->primaryMainWindow()->doc->pdfOptions().Info;
PyObject *info = NULL;
- info = PyString_FromString(tinfo.toAscii());
+ info = PyString_FromString(tinfo.toLatin1());
if (info){
Py_DECREF(self->info);
self->info = info;
@@ -1205,7 +1205,7 @@
fn = "Cannot write the File: " + fn;
if (!errorMessage.isEmpty())
fn += QString("\n%1").arg(errorMessage);
- PyErr_SetString(PyExc_SystemError, fn.toAscii());
+ PyErr_SetString(PyExc_SystemError, fn.toLatin1());
return NULL;
}
// Py_INCREF(Py_None);
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp Sun Mar 10 21:36:32 2013
@@ -168,7 +168,7 @@
tf = fi.path()+"/"+fi.baseName()+".pdf";
}
PyObject *file = NULL;
- file = PyString_FromString(tf.toAscii());
+ file = PyString_FromString(tf.toLatin1());
if (file){
Py_DECREF(self->file);
self->file = file;
Modified: trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp Sun Mar 10 21:36:32 2013
@@ -24,7 +24,7 @@
fileWidget->setDirectory(scriptDir);
else
fileWidget->setDirectory(QDir::current());
- fileWidget->setFilter( tr("Python Scripts (*.py *.PY);; All Files (*)"));
+ fileWidget->setNameFilter( tr("Python Scripts (*.py *.PY);; All Files (*)"));
if (!extEnable)
extChk->setVisible(false);
Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp Sun Mar 10 21:36:32 2013
@@ -457,7 +457,7 @@
scrScripterActions["scripterShowConsole"]->setChecked(visible);
pcon->setFonts();
- pcon->setShown(visible);
+ pcon->setVisible(visible);
QObject::connect( scrScripterActions["scripterShowConsole"], SIGNAL(toggled(bool)) , this, SLOT(slotInteractiveScript(bool)) );
}
@@ -562,7 +562,7 @@
this->slotRunScriptFile(this->m_startupScript, true);
}
else
- qDebug("Startup script enabled, but couln't find script %s.", m_startupScript.toAscii().constData());
+ qDebug("Startup script enabled, but couln't find script %s.", m_startupScript.toLatin1().constData());
}
}
Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp Sun Mar 10 21:36:32 2013
@@ -741,7 +741,7 @@
if (unitGetStrFromIndex(i) == "in")
name = PyString_FromString("inch");
else
- name = PyString_FromString(unitGetStrFromIndex(i).toAscii().constData());
+ name = PyString_FromString(unitGetStrFromIndex(i).toLatin1().constData());
if (!name)
{
initscribus_failed(__FILE__, __LINE__);
Modified: trunk/Scribus/scribus/plugins/short-words/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/short-words/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/short-words/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -29,8 +29,13 @@
SET(SCRIBUS_SHORTWORDS_PLUGIN "scribusshortwords")
-QT4_WRAP_UI(SHORTWORDS_PLUGIN_UI_SOURCES ${SHORTWORDS_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(SHORTWORDS_PLUGIN_MOC_SOURCES ${SHORTWORDS_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(SHORTWORDS_PLUGIN_UI_SOURCES ${SHORTWORDS_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(SHORTWORDS_PLUGIN_MOC_SOURCES ${SHORTWORDS_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(SHORTWORDS_PLUGIN_UI_SOURCES ${SHORTWORDS_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(SHORTWORDS_PLUGIN_MOC_SOURCES ${SHORTWORDS_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SHORTWORDS_PLUGIN} MODULE
${SHORTWORDS_PLUGIN_SOURCES}
Modified: trunk/Scribus/scribus/plugins/short-words/swsyntaxhighlighter.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/short-words/swsyntaxhighlighter.h
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/swsyntaxhighlighter.h (original)
+++ trunk/Scribus/scribus/plugins/short-words/swsyntaxhighlighter.h Sun Mar 10 21:36:32 2013
@@ -8,6 +8,7 @@
#define SWSYNTAXHIGHLIGHTER_H
#include <QSyntaxHighlighter>
+#include <QTextEdit>
/*! Simple syntax highlighting for configuration editor (QTextEdit).
\author Petr Vanek, <petr at yarpen.cz>
Modified: trunk/Scribus/scribus/plugins/svgexplugin/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/svgexplugin/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/svgexplugin/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/svgexplugin/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_EXPORTSVG_PLUGIN "svgexplugin")
-QT4_WRAP_CPP(EXPORTSVG_PLUGIN_MOC_SOURCES ${EXPORTSVG_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(EXPORTSVG_PLUGIN_MOC_SOURCES ${EXPORTSVG_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(EXPORTSVG_PLUGIN_MOC_SOURCES ${EXPORTSVG_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_EXPORTSVG_PLUGIN} MODULE ${EXPORTSVG_PLUGIN_SOURCES} ${EXPORTSVG_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_MESHDISTORTION_PLUGIN "meshdistortion")
-QT4_WRAP_UI(MESHDISTORTION_PLUGIN_UI_SOURCES ${MESHDISTORTION_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(MESHDISTORTION_PLUGIN_MOC_SOURCES ${MESHDISTORTION_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(MESHDISTORTION_PLUGIN_UI_SOURCES ${MESHDISTORTION_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(MESHDISTORTION_PLUGIN_MOC_SOURCES ${MESHDISTORTION_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(MESHDISTORTION_PLUGIN_UI_SOURCES ${MESHDISTORTION_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(MESHDISTORTION_PLUGIN_MOC_SOURCES ${MESHDISTORTION_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_MESHDISTORTION_PLUGIN} MODULE ${MESHDISTORTION_PLUGIN_SOURCES} ${MESHDISTORTION_PLUGIN_MOC_SOURCES} ${MESHDISTORTION_PLUGIN_UI_CPP} ${MESHDISTORTION_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp Sun Mar 10 21:36:32 2013
@@ -47,7 +47,11 @@
setPen(QPen(Qt::red, 2.0));
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
setZValue(9999999);
+#ifdef USE_QT5
+ acceptHoverEvents();
+#else
setAcceptsHoverEvents(true);
+#endif
mouseMoving = false;
mousePressed = false;
}
@@ -229,7 +233,11 @@
{
scene.addItem(pItem);
pItem->setPos(currItem->xPos() - gx + deltaX, currItem->yPos() - gy + deltaY);
+#ifdef USE_QT5
+ pItem->setRotation(currItem->rotation());
+#else
pItem->rotate(currItem->rotation());
+#endif
}
else
{
@@ -238,7 +246,11 @@
// mm.translate(-parent->xPos(), -parent->yPos());
// pItem->setPos(mm.map(QPointF(currItem->xPos(), currItem->yPos())));
pItem->setPos(QPointF(currItem->gXpos, currItem->gYpos));
+#ifdef USE_QT5
+ pItem->setRotation(currItem->rotation());
+#else
pItem->rotate(currItem->rotation());
+#endif
}
QPainterPath pathO = pp;
QTransform mmO;
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_PATHALONGPATH_PLUGIN "pathalongpath")
-QT4_WRAP_UI(PATHALONGPATH_PLUGIN_UI_SOURCES ${PATHALONGPATH_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(PATHALONGPATH_PLUGIN_MOC_SOURCES ${PATHALONGPATH_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(PATHALONGPATH_PLUGIN_UI_SOURCES ${PATHALONGPATH_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(PATHALONGPATH_PLUGIN_MOC_SOURCES ${PATHALONGPATH_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(PATHALONGPATH_PLUGIN_UI_SOURCES ${PATHALONGPATH_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(PATHALONGPATH_PLUGIN_MOC_SOURCES ${PATHALONGPATH_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_PATHALONGPATH_PLUGIN} MODULE ${PATHALONGPATH_PLUGIN_SOURCES} ${PATHALONGPATH_PLUGIN_MOC_SOURCES} ${PATHALONGPATH_PLUGIN_UI_CPP} ${PATHALONGPATH_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp Sun Mar 10 21:36:32 2013
@@ -346,7 +346,7 @@
currDoc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
QRectF oldR(pathItem->getBoundingRect());
QRectF newR = QRectF(gx, gy, gw, gh);
- currDoc->regionsChanged()->update(newR.unite(oldR));
+ currDoc->regionsChanged()->update(newR.united(oldR));
}
if (effectType != -1)
firstUpdate = false;
@@ -388,7 +388,7 @@
{
QRectF oldR(pathItem->getBoundingRect());
QRectF newR(patternItem->getBoundingRect());
- currDoc->regionsChanged()->update(newR.unite(oldR));
+ currDoc->regionsChanged()->update(newR.united(oldR));
}
if (effectType != -1)
firstUpdate = false;
Modified: trunk/Scribus/scribus/plugins/tools/flattenpath/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/flattenpath/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/flattenpath/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/flattenpath/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_FLATTENPATH_PLUGIN "flattenpath")
-QT4_WRAP_CPP(FLATTENPATH_PLUGIN_MOC_SOURCES ${FLATTENPATH_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(FLATTENPATH_PLUGIN_MOC_SOURCES ${FLATTENPATH_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(FLATTENPATH_PLUGIN_MOC_SOURCES ${FLATTENPATH_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_FLATTENPATH_PLUGIN} MODULE ${FLATTENPATH_PLUGIN_SOURCES} ${FLATTENPATH_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -25,8 +25,13 @@
SET(SCRIBUS_HUNSPELL_PLUGIN "hunspellplugin")
+IF(USE_QT5)
+ QT5_WRAP_UI(HUNSPELL_PLUGIN_UI_SOURCES ${HUNSPELL_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(HUNSPELL_PLUGIN_MOC_SOURCES ${HUNSPELL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
QT4_WRAP_UI(HUNSPELL_PLUGIN_UI_SOURCES ${HUNSPELL_PLUGIN_UI_SRC} )
QT4_WRAP_CPP(HUNSPELL_PLUGIN_MOC_SOURCES ${HUNSPELL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_HUNSPELL_PLUGIN} MODULE
${HUNSPELL_PLUGIN_SOURCES}
Modified: trunk/Scribus/scribus/plugins/tools/lenseffects/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/lenseffects/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/lenseffects/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/lenseffects/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_LENSEFFECTS_PLUGIN "lenseffects")
-QT4_WRAP_UI(LENSEFFECTS_PLUGIN_UI_SOURCES ${LENSEFFECTS_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(LENSEFFECTS_PLUGIN_MOC_SOURCES ${LENSEFFECTS_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(LENSEFFECTS_PLUGIN_UI_SOURCES ${LENSEFFECTS_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(LENSEFFECTS_PLUGIN_MOC_SOURCES ${LENSEFFECTS_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(LENSEFFECTS_PLUGIN_UI_SOURCES ${LENSEFFECTS_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(LENSEFFECTS_PLUGIN_MOC_SOURCES ${LENSEFFECTS_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_LENSEFFECTS_PLUGIN} MODULE ${LENSEFFECTS_PLUGIN_SOURCES} ${LENSEFFECTS_PLUGIN_MOC_SOURCES} ${LENSEFFECTS_PLUGIN_UI_CPP} ${LENSEFFECTS_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp Sun Mar 10 21:36:32 2013
@@ -50,7 +50,11 @@
#endif
setBrush(radialGrad);
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#ifdef USE_QT5
+ acceptHoverEvents();
+#else
setAcceptsHoverEvents(true);
+#endif
}
void LensItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
@@ -295,7 +299,11 @@
{
scene.addItem(pItem);
pItem->setPos(currItem->xPos() - gx, currItem->yPos() - gy);
+#ifdef USE_QT5
+ pItem->setRotation(currItem->rotation());
+#else
pItem->rotate(currItem->rotation());
+#endif
}
else
{
Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/pathconnect/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathconnect/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/pathconnect/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_PATHCONNECT_PLUGIN "pathconnect")
-QT4_WRAP_UI(PATHCONNECT_PLUGIN_UI_SOURCES ${PATHCONNECT_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(PATHCONNECT_PLUGIN_MOC_SOURCES ${PATHCONNECT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(PATHCONNECT_PLUGIN_UI_SOURCES ${PATHCONNECT_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(PATHCONNECT_PLUGIN_MOC_SOURCES ${PATHCONNECT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(PATHCONNECT_PLUGIN_UI_SOURCES ${PATHCONNECT_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(PATHCONNECT_PLUGIN_MOC_SOURCES ${PATHCONNECT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_PATHCONNECT_PLUGIN} MODULE ${PATHCONNECT_PLUGIN_SOURCES} ${PATHCONNECT_PLUGIN_MOC_SOURCES} ${PATHCONNECT_PLUGIN_UI_CPP} ${PATHCONNECT_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp Sun Mar 10 21:36:32 2013
@@ -209,7 +209,7 @@
{
QRectF oldR(Item1->getBoundingRect());
QRectF newR(Item2->getBoundingRect());
- currDoc->regionsChanged()->update(newR.unite(oldR));
+ currDoc->regionsChanged()->update(newR.united(oldR));
}
if (effectType != -1)
firstUpdate = false;
Modified: trunk/Scribus/scribus/plugins/tools/pathcut/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/pathcut/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathcut/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/pathcut/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -18,7 +18,11 @@
SET(SCRIBUS_PATHCUT_PLUGIN "pathcut")
-QT4_WRAP_CPP(PATHCUT_PLUGIN_MOC_SOURCES ${PATHCUT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(PATHCUT_PLUGIN_MOC_SOURCES ${PATHCUT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(PATHCUT_PLUGIN_MOC_SOURCES ${PATHCUT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_PATHCUT_PLUGIN} MODULE ${PATHCUT_PLUGIN_SOURCES} ${PATHCUT_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/pathfinder/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/pathfinder/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathfinder/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/pathfinder/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -28,8 +28,13 @@
SET(SCRIBUS_PATHFINDER_PLUGIN "pathfinder")
-QT4_WRAP_UI(PATHFINDER_PLUGIN_UI_SOURCES ${PATHFINDER_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(PATHFINDER_PLUGIN_MOC_SOURCES ${PATHFINDER_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(PATHFINDER_PLUGIN_UI_SOURCES ${PATHFINDER_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(PATHFINDER_PLUGIN_MOC_SOURCES ${PATHFINDER_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(PATHFINDER_PLUGIN_UI_SOURCES ${PATHFINDER_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(PATHFINDER_PLUGIN_MOC_SOURCES ${PATHFINDER_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_PATHFINDER_PLUGIN} MODULE ${PATHFINDER_PLUGIN_SOURCES} ${PATHFINDER_PLUGIN_MOC_SOURCES} ${PATHFINDER_PLUGIN_UI_CPP} ${PATHFINDER_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/pathstroker/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/pathstroker/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathstroker/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/pathstroker/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_PATHSTROKER_PLUGIN "pathstroker")
-QT4_WRAP_CPP(PATHSTROKER_PLUGIN_MOC_SOURCES ${PATHSTROKER_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(PATHSTROKER_PLUGIN_MOC_SOURCES ${PATHSTROKER_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(PATHSTROKER_PLUGIN_MOC_SOURCES ${PATHSTROKER_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_PATHSTROKER_PLUGIN} MODULE ${PATHSTROKER_PLUGIN_SOURCES} ${PATHSTROKER_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/smoothpath/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/smoothpath/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/smoothpath/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/smoothpath/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_SMOOTHPATH_PLUGIN "smoothpath")
-QT4_WRAP_CPP(SMOOTHPATH_PLUGIN_MOC_SOURCES ${SMOOTHPATH_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SMOOTHPATH_PLUGIN_MOC_SOURCES ${SMOOTHPATH_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SMOOTHPATH_PLUGIN_MOC_SOURCES ${SMOOTHPATH_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SMOOTHPATH_PLUGIN} MODULE ${SMOOTHPATH_PLUGIN_SOURCES} ${SMOOTHPATH_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/spellcheck/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/spellcheck/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/spellcheck/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/spellcheck/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -34,8 +34,13 @@
SET(SCRIBUS_ASPELL_PLUGIN "x_aspellplugin")
+IF(USE_QT5)
+ QT5_WRAP_UI(ASPELL_PLUGIN_UI_SOURCES ${ASPELL_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(ASPELL_PLUGIN_MOC_SOURCES ${ASPELL_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
QT4_WRAP_UI(ASPELL_PLUGIN_UI_SOURCES ${ASPELL_PLUGIN_UI_SRC} )
QT4_WRAP_CPP(ASPELL_PLUGIN_MOC_SOURCES ${ASPELL_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_ASPELL_PLUGIN} MODULE
${ASPELL_PLUGIN_SOURCES}
Modified: trunk/Scribus/scribus/plugins/tools/subdivide/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/subdivide/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/subdivide/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/subdivide/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -13,7 +13,11 @@
SET(SCRIBUS_SUBDIVIDE_PLUGIN "subdivide")
-QT4_WRAP_CPP(SUBDIVIDE_PLUGIN_MOC_SOURCES ${SUBDIVIDE_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SUBDIVIDE_PLUGIN_MOC_SOURCES ${SUBDIVIDE_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SUBDIVIDE_PLUGIN_MOC_SOURCES ${SUBDIVIDE_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_SUBDIVIDE_PLUGIN} MODULE ${SUBDIVIDE_PLUGIN_SOURCES} ${SUBDIVIDE_PLUGIN_MOC_SOURCES})
Modified: trunk/Scribus/scribus/plugins/tools/transform/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/plugins/tools/transform/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/transform/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/tools/transform/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,8 +19,13 @@
SET(SCRIBUS_TRANSFORMEFFECT_PLUGIN "transformeffect")
-QT4_WRAP_UI(TRANSFORMEFFECT_PLUGIN_UI_SOURCES ${TRANSFORMEFFECT_PLUGIN_UI_SRC} )
-QT4_WRAP_CPP(TRANSFORMEFFECT_PLUGIN_MOC_SOURCES ${TRANSFORMEFFECT_PLUGIN_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_UI(TRANSFORMEFFECT_PLUGIN_UI_SOURCES ${TRANSFORMEFFECT_PLUGIN_UI_SRC} )
+ QT5_WRAP_CPP(TRANSFORMEFFECT_PLUGIN_MOC_SOURCES ${TRANSFORMEFFECT_PLUGIN_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_UI(TRANSFORMEFFECT_PLUGIN_UI_SOURCES ${TRANSFORMEFFECT_PLUGIN_UI_SRC} )
+ QT4_WRAP_CPP(TRANSFORMEFFECT_PLUGIN_MOC_SOURCES ${TRANSFORMEFFECT_PLUGIN_MOC_CLASSES})
+ENDIF(USE_QT5)
ADD_LIBRARY(${SCRIBUS_TRANSFORMEFFECT_PLUGIN} MODULE ${TRANSFORMEFFECT_PLUGIN_SOURCES} ${TRANSFORMEFFECT_PLUGIN_MOC_SOURCES} ${TRANSFORMEFFECT_PLUGIN_UI_CPP} ${TRANSFORMEFFECT_PLUGIN_UI_SOURCES})
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Sun Mar 10 21:36:32 2013
@@ -940,7 +940,7 @@
if (userprefsContext)
{
appPrefs.uiPrefs.language = userprefsContext->get("gui_language","");
- appPrefs.uiPrefs.mainWinState = QByteArray::fromBase64(userprefsContext->get("mainwinstate","").toAscii());
+ appPrefs.uiPrefs.mainWinState = QByteArray::fromBase64(userprefsContext->get("mainwinstate","").toLatin1());
//continue here...
//Prefs."blah blah" =...
}
@@ -994,7 +994,7 @@
if (userprefsContext)
{
userprefsContext->set("gui_language", appPrefs.uiPrefs.language);
- userprefsContext->set("mainwinstate", QString::fromAscii(appPrefs.uiPrefs.mainWinState.toBase64()));
+ userprefsContext->set("mainwinstate", QString::fromLatin1(appPrefs.uiPrefs.mainWinState.toBase64()));
//continue here...
//Prefs."blah blah" =...
}
@@ -1250,7 +1250,7 @@
appPrefs.keyShortcutPrefs.KeyActions.insert(actName, ke);
}
else
- qDebug("%s", QString("Action Name: %1 does not exist").arg(actName).toAscii().constData());
+ qDebug("%s", QString("Action Name: %1 does not exist").arg(actName).toLatin1().constData());
}
}
Modified: trunk/Scribus/scribus/scimagestructs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scimagestructs.cpp
==============================================================================
--- trunk/Scribus/scribus/scimagestructs.cpp (original)
+++ trunk/Scribus/scribus/scimagestructs.cpp Sun Mar 10 21:36:32 2013
@@ -170,7 +170,7 @@
exifDataValid = !exifData.isNull();
if (exifDataValid)
{
- QByteArray exif = QByteArray::fromBase64(exifData.toAscii());
+ QByteArray exif = QByteArray::fromBase64(exifData.toLatin1());
QDataStream es(exif);
es.setVersion(dsVersion);
qint32 v2;
Modified: trunk/Scribus/scribus/scimgdataloader_jpeg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scimgdataloader_jpeg.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_jpeg.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_jpeg.cpp Sun Mar 10 21:36:32 2013
@@ -362,7 +362,11 @@
else if ( cinfo.output_components == 1 )
{
m_image = QImage( cinfo.output_width, cinfo.output_height, QImage::Format_Indexed8 );
+#ifdef USE_QT5
+ m_image.setColorCount(256);
+#else
m_image.setNumColors(256);
+#endif
for (int i=0; i<256; i++)
m_image.setColor(i, qRgb(i,i,i));
}
Modified: trunk/Scribus/scribus/scimgdataloader_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scimgdataloader_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_pdf.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_pdf.cpp Sun Mar 10 21:36:32 2013
@@ -104,8 +104,8 @@
}
m_imageInfoRecord.BBoxX = 0;
m_imageInfoRecord.BBoxH = m_image.height();
- m_imageInfoRecord.xres = qRound(gsRes);
- m_imageInfoRecord.yres = qRound(gsRes);
+ m_imageInfoRecord.xres = gsRes;
+ m_imageInfoRecord.yres = gsRes;
m_imageInfoRecord.colorspace = ColorSpaceRGB;
m_image.setDotsPerMeterX ((int) (xres / 0.0254));
m_image.setDotsPerMeterY ((int) (yres / 0.0254));
Modified: trunk/Scribus/scribus/scimgdataloader_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scimgdataloader_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_ps.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_ps.cpp Sun Mar 10 21:36:32 2013
@@ -519,8 +519,8 @@
m_image = m_imageInfoRecord.exifInfo.thumbnail;
if ((isPhotoshop) && (hasPhotoshopImageData))
{
- m_imageInfoRecord.exifInfo.width = qRound(psXSize);
- m_imageInfoRecord.exifInfo.height = qRound(psYSize);
+ m_imageInfoRecord.exifInfo.width = psXSize;
+ m_imageInfoRecord.exifInfo.height = psYSize;
m_imageInfoRecord.type = ImageType7;
if (psMode == 4)
{
@@ -620,8 +620,8 @@
m_imageInfoRecord.BBoxX = 0;
m_imageInfoRecord.BBoxH = m_image.height();
}
- m_imageInfoRecord.xres = qRound(gsRes);
- m_imageInfoRecord.yres = qRound(gsRes);
+ m_imageInfoRecord.xres = gsRes;
+ m_imageInfoRecord.yres = gsRes;
if ((m_imageInfoRecord.isEmbedded) && (m_profileComponents == 3))
m_imageInfoRecord.type = ImageType7;
m_imageInfoRecord.colorspace = ColorSpaceRGB;
@@ -691,8 +691,8 @@
m_imageInfoRecord.BBoxX = 0;
m_imageInfoRecord.BBoxH = m_image.height();
}
- m_imageInfoRecord.xres = qRound(gsRes);
- m_imageInfoRecord.yres = qRound(gsRes);
+ m_imageInfoRecord.xres = gsRes;
+ m_imageInfoRecord.yres = gsRes;
m_imageInfoRecord.colorspace = ColorSpaceCMYK;
m_imageInfoRecord.type = ImageType7;
m_image.setDotsPerMeterX ((int) (xres / 0.0254));
@@ -923,7 +923,11 @@
else if ( cinfo.output_components == 1 )
{
m_image = QImage( cinfo.output_width, cinfo.output_height, QImage::Format_Indexed8 );
+#ifdef USE_QT5
+ m_image.setColorCount(256);
+#else
m_image.setNumColors(256);
+#endif
for (int i=0; i<256; i++)
m_image.setColor(i, qRgb(i,i,i));
}
@@ -1043,7 +1047,11 @@
else if ( cinfo.output_components == 1 )
{
tmpImg = QImage( cinfo.output_width, cinfo.output_height, QImage::Format_Indexed8 );
- tmpImg.setNumColors(256);
+#ifdef USE_QT5
+ m_image.setColorCount(256);
+#else
+ m_image.setNumColors(256);
+#endif
for (int i=0; i<256; i++)
tmpImg.setColor(i, qRgb(i,i,i));
m_pixelFormat = Format_GRAY_8;
@@ -1599,8 +1607,8 @@
m_imageInfoRecord.BBoxX = 0;
m_imageInfoRecord.BBoxH = m_image.height();
}
- m_imageInfoRecord.xres = qRound(gsRes);
- m_imageInfoRecord.yres = qRound(gsRes);
+ m_imageInfoRecord.xres = gsRes;
+ m_imageInfoRecord.yres = gsRes;
m_imageInfoRecord.colorspace = ColorSpaceCMYK;
m_imageInfoRecord.type = ImageType7;
m_image.setDotsPerMeterX ((int) (xres / 0.0254));
Modified: trunk/Scribus/scribus/scimgdataloader_tiff.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scimgdataloader_tiff.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_tiff.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_tiff.cpp Sun Mar 10 21:36:32 2013
@@ -19,7 +19,7 @@
{
static const TIFFFieldInfo xtiffFieldInfo[] =
{
- { 37724, -3, -3, TIFF_UNDEFINED, FIELD_CUSTOM, TRUE, TRUE, const_cast<char*>("PhotoshopLayerData") }
+ { 37724, -3, -3, TIFF_UNDEFINED, FIELD_CUSTOM, true, true, const_cast<char*>("PhotoshopLayerData") }
};
TIFFMergeFieldInfo(tiff, xtiffFieldInfo, sizeof (xtiffFieldInfo) / sizeof (xtiffFieldInfo[0]));
}
Modified: trunk/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp (original)
+++ trunk/Scribus/scribus/scpageoutput.cpp Sun Mar 10 21:36:32 2013
@@ -1591,7 +1591,7 @@
e2 = clip;
else
{
- e2 = QRect(qRound(clip.x() + m_doc->minCanvasCoordinate.x()), qRound(clip.y() + m_doc->minCanvasCoordinate.y()), qRound(clip.width()), qRound(clip.height()));
+ e2 = QRect(qRound(clip.x() + m_doc->minCanvasCoordinate.x()), qRound(clip.y() + m_doc->minCanvasCoordinate.y()), clip.width(), clip.height());
wm.translate(item->xPos(), item->yPos());
}
wm.rotate(item->rotation());
Modified: trunk/Scribus/scribus/scraction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scraction.cpp
==============================================================================
--- trunk/Scribus/scribus/scraction.cpp (original)
+++ trunk/Scribus/scribus/scraction.cpp Sun Mar 10 21:36:32 2013
@@ -240,7 +240,11 @@
void ScrAction::setToolTipFromTextAndShortcut()
{
+#ifdef USE_QT5
+ QString sct(shortcut().toString());
+#else
QString sct(shortcut());
+#endif
if (sct.isEmpty())
QAction::setToolTip("<qt>" + cleanMenuText() + "</qt>");
else
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Mar 10 21:36:32 2013
@@ -493,35 +493,39 @@
palettesStatus[0] = false;
guidesStatus[0] = false;
#ifdef HAVE_OSG
- QStringList supportedExts;
- supportedExts << "osg" << "dxf" << "flt" << "ive" << "geo" << "sta" << "stl" << "logo" << "3ds" << "ac" << "obj";
- QStringList realSupportedExts;
- QMap<QString, QString> formats;
- osgDB::FileNameList plugins = osgDB::listAllAvailablePlugins();
- for(osgDB::FileNameList::iterator itr = plugins.begin(); itr != plugins.end(); ++itr)
- {
- osgDB::ReaderWriterInfoList infoList;
- if (osgDB::queryPlugin(*itr, infoList))
- {
- for(osgDB::ReaderWriterInfoList::iterator rwi_itr = infoList.begin(); rwi_itr != infoList.end(); ++rwi_itr)
- {
- osgDB::ReaderWriterInfo& info = *(*rwi_itr);
- osgDB::ReaderWriter::FormatDescriptionMap::iterator fdm_itr;
- for(fdm_itr = info.extensions.begin(); fdm_itr != info.extensions.end(); ++fdm_itr)
+ #ifdef USE_QT5
+ osgFilterString = tr("All Files (*)");
+ #else
+ QStringList supportedExts;
+ supportedExts << "osg" << "dxf" << "flt" << "ive" << "geo" << "sta" << "stl" << "logo" << "3ds" << "ac" << "obj";
+ QStringList realSupportedExts;
+ QMap<QString, QString> formats;
+ osgDB::FileNameList plugins = osgDB::listAllAvailablePlugins();
+ for(osgDB::FileNameList::iterator itr = plugins.begin(); itr != plugins.end(); ++itr)
+ {
+ osgDB::ReaderWriterInfoList infoList;
+ if (osgDB::queryPlugin(*itr, infoList))
+ {
+ for(osgDB::ReaderWriterInfoList::iterator rwi_itr = infoList.begin(); rwi_itr != infoList.end(); ++rwi_itr)
{
- if (supportedExts.contains(QString::fromStdString(fdm_itr->first)))
+ osgDB::ReaderWriterInfo& info = *(*rwi_itr);
+ osgDB::ReaderWriter::FormatDescriptionMap::iterator fdm_itr;
+ for(fdm_itr = info.extensions.begin(); fdm_itr != info.extensions.end(); ++fdm_itr)
{
- formats.insert("*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper(), QString::fromStdString(fdm_itr->second) + " (*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper() + ")");
+ if (supportedExts.contains(QString::fromStdString(fdm_itr->first)))
+ {
+ formats.insert("*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper(), QString::fromStdString(fdm_itr->second) + " (*." + QString::fromStdString(fdm_itr->first) + " *." + QString::fromStdString(fdm_itr->first).toUpper() + ")");
+ }
}
}
}
}
- }
- realSupportedExts = formats.keys();
- QString docexts = realSupportedExts.join(" ");
- QStringList longList = formats.values();
- QString longDesc = longList.join(";;") + ";;";
- osgFilterString = tr("All Supported Formats (%1);;%2All Files (*)").arg(docexts).arg(longDesc);
+ realSupportedExts = formats.keys();
+ QString docexts = realSupportedExts.join(" ");
+ QStringList longList = formats.values();
+ QString longDesc = longList.join(";;") + ";;";
+ osgFilterString = tr("All Supported Formats (%1);;%2All Files (*)").arg(docexts).arg(longDesc);
+ #endif
#endif
}
@@ -532,7 +536,11 @@
{
if ((ScrAction*)(it.value())!=NULL)
{
- QString accelerator=it.value()->shortcut();
+#ifdef USE_QT5
+ QString accelerator = it.value()->shortcut().toString();
+#else
+ QString accelerator = it.value()->shortcut();
+#endif
prefsManager->setKeyEntry(it.key(), it.value()->cleanMenuText(), accelerator,0);
}
//else
@@ -595,7 +603,7 @@
docCheckerPalette->installEventFilter(this);
docCheckerPalette->hide();
- alignDistributePalette = new AlignDistributePalette(this, "AlignDistributePalette", false);
+ alignDistributePalette = new AlignDistributePalette(this, "AlignDistributePalette");
connect( scrActions["toolsAlignDistribute"], SIGNAL(toggled(bool)) , alignDistributePalette, SLOT(setPaletteShown(bool)) );
connect( alignDistributePalette, SIGNAL(paletteShown(bool)), scrActions["toolsAlignDistribute"], SLOT(setChecked(bool)));
connect( alignDistributePalette, SIGNAL(documentChanged()), this, SLOT(slotDocCh()));
@@ -1321,8 +1329,13 @@
keyMod |= Qt::ALT;
QKeySequence currKeySeq = QKeySequence(k->key() | keyMod);
+#ifdef USE_QT5
+ if (QString(currKeySeq.toString()).isNull())
+ return false;
+#else
if (QString(currKeySeq).isNull())
return false;
+#endif
retVal=true;
//Palette actions
if (currKeySeq == scrActions["specialToggleAllPalettes"]->shortcut())
@@ -7293,7 +7306,7 @@
else
{
bool ok = false;
- Query dia(this, "New", 1, 0, tr("&Size:"), tr("Size"));
+ Query dia(this, "New", 1, tr("&Size:"), tr("Size"));
if (dia.exec())
{
c = qRound(dia.getEditText().toDouble(&ok));
@@ -7321,7 +7334,7 @@
}
else
{
- Query dia(this, "New", 1, 0, tr("&Shade:"), tr("Shade"));
+ Query dia(this, "New", 1, tr("&Shade:"), tr("Shade"));
if (dia.exec())
{
c = dia.getEditText().toInt(&ok);
@@ -10523,7 +10536,7 @@
patternsDependingOnThis.prepend(temp);
}
allItems.clear();
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("New Entry"));
dia.setEditText(patternName, true);
dia.setForbiddenList(patternsDependingOnThis);
dia.setTestList(doc->docPatterns.keys());
@@ -10645,7 +10658,7 @@
patternsDependingOnThis.prepend(temp);
}
allItems.clear();
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("New Entry"));
dia.setEditText(patternName, true);
dia.setForbiddenList(patternsDependingOnThis);
dia.setTestList(doc->docPatterns.keys());
Modified: trunk/Scribus/scribus/scribusapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp (original)
+++ trunk/Scribus/scribus/scribusapp.cpp Sun Mar 10 21:36:32 2013
@@ -141,12 +141,15 @@
swapDialogButtonOrder=false;
//Parse for command line information options, and lang
- for(int i = 1; i < argc(); i++)
- {
- arg = argv()[i];
-
- if ((arg == ARG_LANG || arg == ARG_LANG_SHORT) && (++i < argc())) {
- lang = argv()[i];
+ // Qt5 port: do this in a Qt compatible manner
+ QStringList args = arguments();
+ int argsc = args.count();
+ for(int i = 1; i < argsc; i++)
+ {
+ arg = args[i];
+
+ if ((arg == ARG_LANG || arg == ARG_LANG_SHORT) && (++i < argsc)) {
+ lang = args[i];
}
else if (arg == ARG_VERSION || arg == ARG_VERSION_SHORT) {
header=true;
@@ -187,21 +190,23 @@
if (runtests)
RunTests::runTests(testargsc, testargsv);
#endif
+#ifndef USE_QT5 // currently disabled as it needs a complete rewrite in Qt 5
if (runUpgradeCheck)
{
UpgradeChecker uc;
uc.fetch();
}
+#endif
//Dont run the GUI init process called from main.cpp, and return
if (!header)
useGUI=true;
else
return;
//We are going to run something other than command line help
- for(int i = 1; i < argc(); i++) {
- arg = argv()[i];
-
- if ((arg == ARG_LANG || arg == ARG_LANG_SHORT) && (++i < argc())) {
+ for(int i = 1; i < argsc; i++) {
+ arg = args[i];
+
+ if ((arg == ARG_LANG || arg == ARG_LANG_SHORT) && (++i < argsc)) {
continue;
} else if ( arg == ARG_CONSOLE || arg == ARG_CONSOLE_SHORT ) {
continue;
@@ -219,12 +224,12 @@
showProfileInfo=true;
} else if (arg == ARG_SWAPDIABUTTONS || arg == ARG_SWAPDIABUTTONS_SHORT) {
swapDialogButtonOrder=true;
- } else if ((arg == ARG_DISPLAY || arg==ARG_DISPLAY_SHORT || arg==ARG_DISPLAY_QT) && ++i < argc()) {
+ } else if ((arg == ARG_DISPLAY || arg==ARG_DISPLAY_SHORT || arg==ARG_DISPLAY_QT) && ++i < argsc) {
// allow setting of display, QT expect the option -display <display_name> so we discard the
// last argument. FIXME: Qt only understands -display not --display and -d , we need to work
// around this.
} else if (arg == ARG_PREFS || arg == ARG_PREFS_SHORT) {
- prefsUserFile = QFile::decodeName(argv()[i + 1]);
+ prefsUserFile = QFile::decodeName(args[i + 1].toLocal8Bit());
if (!QFileInfo(prefsUserFile).exists()) {
showHeader();
if (fileName.left(1) == "-" || fileName.left(2) == "--") {
@@ -242,7 +247,7 @@
{
// Andreas Vox: Qt/Mac has -psn_blah flags that must be accepted.
} else {
- fileName = QFile::decodeName(argv()[i]);
+ fileName = QFile::decodeName(args[i].toLocal8Bit());
if (!QFileInfo(fileName).exists()) {
showHeader();
if (fileName.left(1) == "-" || fileName.left(2) == "--") {
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun Mar 10 21:36:32 2013
@@ -38,7 +38,7 @@
#include <QProgressBar>
#include <QtAlgorithms>
#include <QTime>
-#include <qtconcurrentmap.h>
+//#include <qtconcurrentmap.h>
#include "canvas.h"
#include "ui/masterpagepalette.h"
@@ -14178,7 +14178,7 @@
if (!loading)
{
QRectF newR(currItem->getBoundingRect());
- regionsChanged()->update(newR.unite(oldR));
+ regionsChanged()->update(newR.united(oldR));
}
//emit SetAngle(currItem->rotation());
}
@@ -14304,12 +14304,12 @@
if (!loading)
{
QRectF newR(currItem->getBoundingRect());
- invalidateRegion(newR.unite(oldR));
+ invalidateRegion(newR.united(oldR));
}
if ((redraw) && (!loading))
{
QRectF newR(currItem->getBoundingRect());
- regionsChanged()->update(newR.unite(oldR));
+ regionsChanged()->update(newR.united(oldR));
}
if (!fromMP)
{
@@ -14558,7 +14558,7 @@
itemSelection->getGroupRect(&gxS, &gyS, &gwS, &ghS);
// gxS -= minCanvasCoordinate.x();
// gyS -= minCanvasCoordinate.y();
- regionsChanged()->update(QRectF(gxS-5, gyS-5, gwS+10, ghS+10).unite(oldR));
+ regionsChanged()->update(QRectF(gxS-5, gyS-5, gwS+10, ghS+10).united(oldR));
}
void ScribusDoc::scaleGroup(double scx, double scy, bool scaleText, Selection* customSelection, bool scaleLine)
@@ -14752,7 +14752,7 @@
// gx -= minCanvasCoordinate.x();
// gy -= minCanvasCoordinate.y();
updateManager()->setUpdatesEnabled();
- regionsChanged()->update(QRectF(gx-5, gy-5, gw+10, gh+10).unite(oldR));
+ regionsChanged()->update(QRectF(gx-5, gy-5, gw+10, gh+10).united(oldR));
itemSelection->setGroupRect();
itemSelection->getGroupRect(&gx, &gy, &gw, &gh);
for (uint a = 0; a < selectedItemCount; ++a)
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Sun Mar 10 21:36:32 2013
@@ -4280,9 +4280,9 @@
void ScribusView::setRulersShown(bool isShown)
{
- vertRuler->setShown(isShown);
- horizRuler->setShown(isShown);
- rulerMover->setShown(isShown);
+ vertRuler->setVisible(isShown);
+ horizRuler->setVisible(isShown);
+ rulerMover->setVisible(isShown);
int newTopLeftMargin = isShown ? m_vhRulerHW : 0;
setViewportMargins(newTopLeftMargin, newTopLeftMargin, 0, 0);
}
Modified: trunk/Scribus/scribus/scribuswin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scribuswin.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuswin.cpp (original)
+++ trunk/Scribus/scribus/scribuswin.cpp Sun Mar 10 21:36:32 2013
@@ -168,6 +168,7 @@
statusBar()->setSizeGripEnabled(!isMaximized());
}
+#ifndef USE_QT5
void ScribusWin::windowActivationChange ( bool oldActive )
{
if( isActiveWindow() )
@@ -176,3 +177,4 @@
currentDir = QDir::currentPath();
QMainWindow::windowActivationChange( oldActive );
}
+#endif
Modified: trunk/Scribus/scribus/scribuswin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/scribuswin.h
==============================================================================
--- trunk/Scribus/scribus/scribuswin.h (original)
+++ trunk/Scribus/scribus/scribuswin.h Sun Mar 10 21:36:32 2013
@@ -66,7 +66,9 @@
void AutoSaved();
protected:
+#ifndef USE_QT5
virtual void windowActivationChange ( bool oldActive );
+#endif
QString currentDir;
QHBoxLayout* statusFrameLayout;
ScribusMainWindow* m_MainWindow;
Modified: trunk/Scribus/scribus/styles/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/styles/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/styles/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/styles/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -19,7 +19,11 @@
cellstyle.cpp
)
-QT4_WRAP_CPP(SCRIBUS_STYLES_MOC_SOURCES ${SCRIBUS_STYLES_MOC_CLASSES})
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCRIBUS_STYLES_MOC_SOURCES ${SCRIBUS_STYLES_MOC_CLASSES})
+ELSE(USE_QT5)
+ QT4_WRAP_CPP(SCRIBUS_STYLES_MOC_SOURCES ${SCRIBUS_STYLES_MOC_CLASSES})
+ENDIF(USE_QT5)
SET(SCRIBUS_STYLES_LIB "scribus_styles_lib")
ADD_LIBRARY(${SCRIBUS_STYLES_LIB} STATIC ${SCRIBUS_STYLES_LIB_SOURCES} ${SCRIBUS_STYLES_MOC_SOURCES})
Modified: trunk/Scribus/scribus/text/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/text/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/text/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/text/CMakeLists.txt Sun Mar 10 21:36:32 2013
@@ -18,9 +18,11 @@
)
-# IF(QT4_WRAP_CPP)
+IF(USE_QT5)
+ QT5_WRAP_CPP(SCRIBUS_TEXT_MOC_SOURCES ${SCRIBUS_TEXT_MOC_CLASSES})
+ELSE(USE_QT5)
QT4_WRAP_CPP(SCRIBUS_TEXT_MOC_SOURCES ${SCRIBUS_TEXT_MOC_CLASSES})
-# ENDIF(QT4_WRAP_CPP)
+ENDIF(USE_QT5)
Modified: trunk/Scribus/scribus/text/frect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/text/frect.h
==============================================================================
--- trunk/Scribus/scribus/text/frect.h (original)
+++ trunk/Scribus/scribus/text/frect.h Sun Mar 10 21:36:32 2013
@@ -120,10 +120,10 @@
FRect& operator|=(const FRect &r);
FRect& operator&=(const FRect &r);
- bool contains( FPoint &p, bool proper=FALSE ) const;
+ bool contains( FPoint &p, bool proper=false ) const;
bool contains( qreal x, qreal y ) const; // inline methods, _don't_ merge these
bool contains( qreal x, qreal y, bool proper ) const;
- bool contains( const FRect &r, bool proper=FALSE ) const;
+ bool contains( const FRect &r, bool proper=false ) const;
FRect unite( const FRect &r ) const;
FRect intersect( const FRect &r ) const;
bool intersects( const FRect &r ) const;
Modified: trunk/Scribus/scribus/text/fsize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/text/fsize.cpp
==============================================================================
--- trunk/Scribus/scribus/text/fsize.cpp (original)
+++ trunk/Scribus/scribus/text/fsize.cpp Sun Mar 10 21:36:32 2013
@@ -179,7 +179,7 @@
wd = (qreal)w;
ht = (qreal)h;
} else {
- bool useHeight = TRUE;
+ bool useHeight = true;
qreal w0 = width();
qreal h0 = height();
qreal rw = h * w0 / h0;
Modified: trunk/Scribus/scribus/ui/AdapterWidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/AdapterWidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/AdapterWidget.cpp (original)
+++ trunk/Scribus/scribus/ui/AdapterWidget.cpp Sun Mar 10 21:36:32 2013
@@ -33,7 +33,7 @@
#include "util_icon.h"
#include "AdapterWidget.h"
-AdapterWidget::AdapterWidget ( QWidget * parent, const char * name, const QGLWidget * shareWidget, Qt::WFlags f ) : QGLWidget ( parent, shareWidget, f )
+AdapterWidget::AdapterWidget ( QWidget * parent, const char * name, const QGLWidget * shareWidget) : QGLWidget ( parent, shareWidget)
{
_gw = new osgViewer::GraphicsWindowEmbedded ( 0,0,width(),height() );
setFocusPolicy ( Qt::ClickFocus );
@@ -48,12 +48,12 @@
void AdapterWidget::keyPressEvent ( QKeyEvent* event )
{
- _gw->getEventQueue()->keyPress ( ( osgGA::GUIEventAdapter::KeySymbol ) * ( event->text().toAscii().data() ) );
+ _gw->getEventQueue()->keyPress ( ( osgGA::GUIEventAdapter::KeySymbol ) * ( event->text().toLatin1().data() ) );
}
void AdapterWidget::keyReleaseEvent ( QKeyEvent* event )
{
- _gw->getEventQueue()->keyRelease ( ( osgGA::GUIEventAdapter::KeySymbol ) * ( event->text().toAscii().data() ) );
+ _gw->getEventQueue()->keyRelease ( ( osgGA::GUIEventAdapter::KeySymbol ) * ( event->text().toLatin1().data() ) );
}
void AdapterWidget::mousePressEvent ( QMouseEvent* event )
Modified: trunk/Scribus/scribus/ui/AdapterWidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/AdapterWidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/AdapterWidget.h (original)
+++ trunk/Scribus/scribus/ui/AdapterWidget.h Sun Mar 10 21:36:32 2013
@@ -25,8 +25,7 @@
{
Q_OBJECT
public:
-
- AdapterWidget ( QWidget * parent = 0, const char * name = 0, const QGLWidget * shareWidget = 0, Qt::WFlags f = 0 );
+ AdapterWidget ( QWidget * parent = 0, const char * name = 0, const QGLWidget * shareWidget = 0);
virtual ~AdapterWidget() {}
@@ -54,9 +53,7 @@
class ViewerQT : public osgViewer::Viewer, public AdapterWidget
{
public:
-
- ViewerQT ( QWidget * parent = 0, const char * name = 0, const QGLWidget * shareWidget = 0, Qt::WFlags f = 0 ) :
- AdapterWidget ( parent, name, shareWidget, f )
+ ViewerQT ( QWidget * parent = 0, const char * name = 0, const QGLWidget * shareWidget = 0) : AdapterWidget ( parent, name, shareWidget)
{
getCamera()->setViewport ( new osg::Viewport ( 0,0,width(),height() ) );
getCamera()->setProjectionMatrixAsPerspective ( 30.0f, static_cast<double> ( width() ) /static_cast<double> ( height() ), 1.0f, 10000.0f );
Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Sun Mar 10 21:36:32 2013
@@ -35,7 +35,9 @@
#include "util_ghostscript.h"
#include "util_icon.h"
-#include "upgradechecker.h"
+#ifndef USE_QT5
+ #include "upgradechecker.h"
+#endif
#include "langmgr.h"
@@ -112,8 +114,8 @@
buildID = new QLabel( tab );
buildID->setAlignment(Qt::AlignCenter);
buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
- QString BUILD_DAY = "16";
- QString BUILD_MONTH = CommonStrings::january;
+ QString BUILD_DAY = "10";
+ QString BUILD_MONTH = CommonStrings::march;
QString BUILD_YEAR = "2013";
QString BUILD_TIME = "";
QString BUILD_TZ = "";
@@ -645,6 +647,7 @@
void About::runUpdateCheck()
{
textView5->clear();
+#ifndef USE_QT5
UpgradeCheckerGUI uc(textView5);
disconnect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );
connect(checkForUpdateButton, SIGNAL( clicked() ), &uc, SLOT( abort() ));
@@ -652,4 +655,5 @@
uc.fetch();
checkForUpdateButton->setText( tr("Check for Updates") );
connect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );
+#endif
}
Modified: trunk/Scribus/scribus/ui/aligndistribute.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/aligndistribute.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.cpp (original)
+++ trunk/Scribus/scribus/ui/aligndistribute.cpp Sun Mar 10 21:36:32 2013
@@ -49,8 +49,7 @@
//TODO Distribute with
-AlignDistributePalette::AlignDistributePalette( QWidget* parent, const char* name, bool /*modal*/, Qt::WFlags /*fl*/ )
- : ScDockPalette( parent, name, 0 )
+AlignDistributePalette::AlignDistributePalette( QWidget* parent, const char* name) : ScDockPalette( parent, name, 0 )
{
setupUi(this);
setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
Modified: trunk/Scribus/scribus/ui/aligndistribute.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/aligndistribute.h
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.h (original)
+++ trunk/Scribus/scribus/ui/aligndistribute.h Sun Mar 10 21:36:32 2013
@@ -56,7 +56,7 @@
Q_OBJECT
public:
- AlignDistributePalette( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
+ AlignDistributePalette( QWidget* parent = 0, const char* name = 0);
~AlignDistributePalette();
virtual void setDoc( ScribusDoc* newDoc );
Modified: trunk/Scribus/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/checkDocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.cpp (original)
+++ trunk/Scribus/scribus/ui/checkDocument.cpp Sun Mar 10 21:36:32 2013
@@ -63,8 +63,13 @@
checkDocumentLayout->addLayout( layout1 );
reportDisplay = new QTreeWidget( this );
+#ifdef USE_QT5
+ reportDisplay->header()->setSectionsClickable(false );
+ reportDisplay->header()->setSectionsMovable( false );
+#else
reportDisplay->header()->setClickable( false );
reportDisplay->header()->setMovable( false );
+#endif
reportDisplay->setSortingEnabled(false);
reportDisplay->setAlternatingRowColors(true);
checkDocumentLayout->addWidget( reportDisplay );
@@ -681,7 +686,7 @@
void CheckDocument::setIgnoreEnabled(bool state)
{
noButton = !state;
- ignoreErrors->setShown(state);
+ ignoreErrors->setVisible(state);
}
bool CheckDocument::isIgnoreEnabled()
Modified: trunk/Scribus/scribus/ui/cpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/cpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/cpalette.cpp Sun Mar 10 21:36:32 2013
@@ -1762,13 +1762,3 @@
CGradDia->unitChange(unitIndex);
currentUnit = unitIndex;
}
-
-void Cpalette::changeEvent(QEvent *e)
-{
- if (e->type() == QEvent::LanguageChange)
- {
- languageChange();
- }
- else
- QWidget::changeEvent(e);
-}
Modified: trunk/Scribus/scribus/ui/cpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/cpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/cpalette.h (original)
+++ trunk/Scribus/scribus/ui/cpalette.h Sun Mar 10 21:36:32 2013
@@ -57,8 +57,6 @@
public:
Cpalette(QWidget* parent);
~Cpalette() {};
-
- virtual void changeEvent(QEvent *e);
void setDocument(ScribusDoc* doc);
Modified: trunk/Scribus/scribus/ui/createrange.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/createrange.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/createrange.cpp (original)
+++ trunk/Scribus/scribus/ui/createrange.cpp Sun Mar 10 21:36:32 2013
@@ -17,8 +17,7 @@
#include <QString>
#include <QTabWidget>
-CreateRange::CreateRange(QString currText, int pageCount, QWidget* parent, Qt::WFlags fl )
- : QDialog(parent, fl),
+CreateRange::CreateRange(QString currText, int pageCount, QWidget* parent) : QDialog(parent),
m_PageCount(pageCount),
m_RangeType(0),
m_BasicRangeType(0)
@@ -38,7 +37,7 @@
advPageGroupSizeSpinBox->setDecimals(0);
advPageGroupSizeSpinBox->setSuffix("");
if (m_PageCount==1)
- basicEvenRadioButton->setShown(false);
+ basicEvenRadioButton->setVisible(false);
if (currText.length()>0)
basicRangeListBox->addItem(currText);
// signals and slots connections
Modified: trunk/Scribus/scribus/ui/createrange.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/createrange.h
==============================================================================
--- trunk/Scribus/scribus/ui/createrange.h (original)
+++ trunk/Scribus/scribus/ui/createrange.h Sun Mar 10 21:36:32 2013
@@ -18,7 +18,7 @@
{
Q_OBJECT
public:
- CreateRange(QString currText, int pageCount, QWidget* parent, Qt::WFlags fl=0);
+ CreateRange(QString currText, int pageCount, QWidget* parent);
~CreateRange();
void getCreateRangeData(CreateRangeData&);
Modified: trunk/Scribus/scribus/ui/cupsoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/cupsoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cupsoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/cupsoptions.cpp Sun Mar 10 21:36:32 2013
@@ -65,9 +65,15 @@
Table->setHorizontalHeaderItem(1, new QTableWidgetItem( tr("Value")));
QHeaderView* headerH = Table->horizontalHeader();
headerH->setStretchLastSection(true);
+#ifdef USE_QT5
+ headerH->setSectionsClickable(false );
+ headerH->setSectionsMovable( false );
+ headerH->setSectionResizeMode(QHeaderView::Fixed);
+#else
headerH->setMovable(false);
headerH->setClickable(false);
headerH->setResizeMode(QHeaderView::Fixed);
+#endif
Table->setMinimumSize(300, 100);
#ifdef HAVE_CUPS
int i;
Modified: trunk/Scribus/scribus/ui/customfdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/customfdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/customfdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/customfdialog.cpp Sun Mar 10 21:36:32 2013
@@ -304,8 +304,8 @@
fileDialog = new ScFileWidget(this);
hboxLayout->addWidget(fileDialog);
fileDialog->setIconProvider(new ImIconProvider());
- fileDialog->setFilter(filter);
- fileDialog->selectFilter(filter);
+ fileDialog->setNameFilter(filter);
+ fileDialog->selectNameFilter(filter);
fileDialog->setDirectory(wDir);
vboxLayout1 = new QVBoxLayout;
vboxLayout1->setSpacing(0);
Modified: trunk/Scribus/scribus/ui/extimageprops.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/extimageprops.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/extimageprops.cpp (original)
+++ trunk/Scribus/scribus/ui/extimageprops.cpp Sun Mar 10 21:36:32 2013
@@ -134,8 +134,13 @@
layerTable->setHorizontalHeaderItem(2, new QTableWidgetItem( tr("Name")));
QHeaderView* headerH = layerTable->horizontalHeader();
headerH->setStretchLastSection(true);
+#ifdef USE_QT5
+ headerH->setSectionsClickable(false );
+ headerH->setSectionsMovable( false );
+#else
headerH->setMovable(false);
headerH->setClickable(false);
+#endif
if (info->layerInfo.count() == 1)
{
layerTable->setColumnWidth(1, 40);
@@ -144,8 +149,13 @@
layerTable->setSortingEnabled(false);
layerTable->setSelectionBehavior( QAbstractItemView::SelectRows );
QHeaderView *Header = layerTable->verticalHeader();
+#ifdef USE_QT5
+ Header->setSectionsMovable( false );
+ Header->setSectionResizeMode(QHeaderView::Fixed);
+#else
Header->setMovable(false);
Header->setResizeMode(QHeaderView::Fixed);
+#endif
Header->hide();
FlagsSicht.clear();
int col2Width = 0;
Modified: trunk/Scribus/scribus/ui/fontreplacedialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/fontreplacedialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontreplacedialog.cpp (original)
+++ trunk/Scribus/scribus/ui/fontreplacedialog.cpp Sun Mar 10 21:36:32 2013
@@ -47,9 +47,15 @@
replacementTable->setSortingEnabled(false);
replacementTable->setSelectionBehavior( QAbstractItemView::SelectRows );
QHeaderView *header = replacementTable->horizontalHeader();
+#ifdef USE_QT5
+ header->setSectionsClickable(false );
+ header->setSectionsMovable( false );
+ header->setSectionResizeMode(QHeaderView::Stretch);
+#else
header->setMovable(false);
header->setClickable(false);
header->setResizeMode(QHeaderView::Stretch);
+#endif
replacementTable->verticalHeader()->hide();
replacementTable->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
replacementTable->setRowCount(RList->count());
Modified: trunk/Scribus/scribus/ui/gradientpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/gradientpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gradientpreview.cpp (original)
+++ trunk/Scribus/scribus/ui/gradientpreview.cpp Sun Mar 10 21:36:32 2013
@@ -110,7 +110,7 @@
else
pw.setBrush(Qt::blue);
QPolygon cr;
- cr.setPoints(3, qRound(center), 43, qRound(center-4), 56, qRound(center+4), 56);
+ cr.setPoints(3, center, 43, center-4, 56, center+4, 56);
pw.drawPolygon(cr);
}
}
Modified: trunk/Scribus/scribus/ui/gtfiledialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/gtfiledialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gtfiledialog.cpp (original)
+++ trunk/Scribus/scribus/ui/gtfiledialog.cpp Sun Mar 10 21:36:32 2013
@@ -19,7 +19,7 @@
fileWidget->setDirectory(wdir);
fileWidget->setFileMode(QFileDialog::ExistingFile);
- fileWidget->setFilter(filters);
+ fileWidget->setNameFilter(filters);
importerCombo->setToolTip( tr("Choose the importer to use"));
importerCombo->addItem( tr("Automatic"));
@@ -66,7 +66,7 @@
if (context->contains("filter"))
{
QString filter = context->get("filter");
- QStringList filters = fileWidget->filters();
+ QStringList filters = fileWidget->nameFilters();
if (!filter.isEmpty() && filters.contains(filter))
fileWidget->selectNameFilter(filter);
}
@@ -94,7 +94,7 @@
void gtFileDialog::saveSettings(void)
{
PrefsContext* context = PrefsManager::instance()->prefsFile->getContext("textimport_dialog");
- context->set("filter" , fileWidget->selectedFilter());
+ context->set("filter" , fileWidget->selectedNameFilter());
context->set("importer", importerCombo->currentText());
context->set("encoding", encodingCombo->currentText());
context->set("textonly", textOnlyCheckBox->isChecked());
Modified: trunk/Scribus/scribus/ui/guidemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/guidemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/guidemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/guidemanager.cpp Sun Mar 10 21:36:32 2013
@@ -573,6 +573,7 @@
m_Doc->changed();
}
+#ifndef USE_QT5
void GuideManager::windowActivationChange(bool oldActive)
{
if (m_Doc)
@@ -583,6 +584,7 @@
}
QDialog::windowActivationChange( oldActive );
}
+#endif
Guides GuideManager::getAutoVerticals(ScPage * page)
{
Modified: trunk/Scribus/scribus/ui/guidemanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/guidemanager.h
==============================================================================
--- trunk/Scribus/scribus/ui/guidemanager.h (original)
+++ trunk/Scribus/scribus/ui/guidemanager.h Sun Mar 10 21:36:32 2013
@@ -102,7 +102,9 @@
/*! \brief Overriden QDialog method to operate selection related widgets.
Auto guides tab. It disables the "selection" radio buttons when there
is no selection on current page. */
+#ifndef USE_QT5
void windowActivationChange(bool oldActive);
+#endif
/*! \brief Create automatic horizontal guides.
Calculates positions of the guides.
Modified: trunk/Scribus/scribus/ui/inlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/inlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/inlinepalette.cpp Sun Mar 10 21:36:32 2013
@@ -23,6 +23,8 @@
#include "inlinepalette.h"
#include <QPainter>
#include <QByteArray>
+#include <QDrag>
+#include <QMimeData>
#include "pageitem.h"
#include "pageitem_table.h"
#include "pageitem_textframe.h"
Modified: trunk/Scribus/scribus/ui/insertaframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/insertaframe.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/insertaframe.cpp (original)
+++ trunk/Scribus/scribus/ui/insertaframe.cpp Sun Mar 10 21:36:32 2013
@@ -43,10 +43,6 @@
m_Doc(doc)
{
setupUi(this);
- //Hide some unused items for now
-// radioButtonTable->setShown(false);
-// radioButtonShape->setShown(false);
-// radioButtonPolygon->setShown(false);
placementPagesRangeButton->setIcon(QIcon(loadIcon("ellipsis.png")));
@@ -126,7 +122,7 @@
void InsertAFrame::slotSelectType( int id )
{
checkBoxLinkCreatedTextFrames->setEnabled(id==0);
- radioButtonImageSize->setShown(id==1);
+ radioButtonImageSize->setVisible(id==1);
switch (id)
{
case 0:
Modified: trunk/Scribus/scribus/ui/javadocs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/javadocs.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/javadocs.cpp (original)
+++ trunk/Scribus/scribus/ui/javadocs.cpp Sun Mar 10 21:36:32 2013
@@ -77,7 +77,7 @@
void JavaDocs::slotAdd()
{
QString nam;
- Query dia(this, "tt", 1, 0, tr("&New Script:"), tr("New Script"));
+ Query dia(this, "tt", 1, tr("&New Script:"), tr("New Script"));
dia.setEditText( tr("New Script"), false );
dia.setTestList(Doc->JavaScripts.keys());
if (dia.exec())
Modified: trunk/Scribus/scribus/ui/latexeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/latexeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/latexeditor.cpp Sun Mar 10 21:36:32 2013
@@ -859,12 +859,12 @@
file->seek(basePos);
file->read(buffer, 100);
buffer[100] = 0;
- QString name = QString::fromAscii(buffer);
+ QString name = QString::fromLatin1(buffer);
file->seek(basePos + 124);
file->read(buffer, 12);
buffer[12] = 0;
bool ok;
- len = QString::fromAscii(buffer).toInt(&ok, 8);
+ len = QString::fromLatin1(buffer).toInt(&ok, 8);
basePos += 512;
return name;
}
Modified: trunk/Scribus/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/layers.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/layers.cpp (original)
+++ trunk/Scribus/scribus/ui/layers.cpp Sun Mar 10 21:36:32 2013
@@ -78,10 +78,16 @@
QHeaderView *header = Table->horizontalHeader();
header->setStretchLastSection(true);
+#ifdef USE_QT5
+ header->setSectionsClickable(false );
+ header->setSectionsMovable( false );
+ header->setSectionResizeMode(QHeaderView::Fixed);
+#else
header->setMovable(false);
header->setClickable(true);
+ header->setResizeMode(QHeaderView::Fixed);
+#endif
header->setHighlightSections(false);
- header->setResizeMode(QHeaderView::Fixed);
Table->setColumnWidth(0, 24);
Table->setColumnWidth(1, 24);
@@ -93,8 +99,13 @@
Table->setSortingEnabled(false);
Table->setSelectionBehavior( QAbstractItemView::SelectRows );
QHeaderView *Header = Table->verticalHeader();
+#ifdef USE_QT5
+ Header->setSectionsMovable( false );
+ Header->setSectionResizeMode(QHeaderView::Fixed);
+#else
Header->setMovable(false);
Header->setResizeMode(QHeaderView::Fixed);
+#endif
Header->hide();
LayerPaletteLayout->addWidget( Table );
Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp (original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp Sun Mar 10 21:36:32 2013
@@ -153,8 +153,13 @@
loremList->setRootIsDecorated(true);
loremList->setColumnCount(1);
loremList->setHeaderLabel( tr("Select Lorem Ipsum"));
+#ifdef USE_QT5
+ loremList->header()->setSectionsClickable( false );
+ loremList->header()->setSectionResizeMode( QHeaderView::ResizeToContents );
+#else
loremList->header()->setClickable( false );
loremList->header()->setResizeMode( QHeaderView::ResizeToContents );
+#endif
loremList->setSelectionMode(QAbstractItemView::SingleSelection);
layout3->addWidget( loremList );
Modified: trunk/Scribus/scribus/ui/multipleduplicate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/multipleduplicate.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/multipleduplicate.cpp (original)
+++ trunk/Scribus/scribus/ui/multipleduplicate.cpp Sun Mar 10 21:36:32 2013
@@ -17,9 +17,7 @@
#include "units.h"
#include "usertaskstructs.h"
-MultipleDuplicate::MultipleDuplicate( int unitIndex, QWidget* parent, Qt::WFlags fl )
- : QDialog(parent, fl),
- m_unitIndex(unitIndex)
+MultipleDuplicate::MultipleDuplicate( int unitIndex, QWidget* parent) : QDialog(parent), m_unitIndex(unitIndex)
{
setupUi(this);
//set tab order
Modified: trunk/Scribus/scribus/ui/multipleduplicate.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/multipleduplicate.h
==============================================================================
--- trunk/Scribus/scribus/ui/multipleduplicate.h (original)
+++ trunk/Scribus/scribus/ui/multipleduplicate.h Sun Mar 10 21:36:32 2013
@@ -14,7 +14,7 @@
{
Q_OBJECT
public:
- MultipleDuplicate(int unitIndex, QWidget* parent, Qt::WFlags fl=0);
+ MultipleDuplicate(int unitIndex, QWidget* parent);
~MultipleDuplicate();
void getMultiplyData(ItemMultipleDuplicateData&);
protected:
Modified: trunk/Scribus/scribus/ui/multiprogressdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/multiprogressdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/multiprogressdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/multiprogressdialog.cpp Sun Mar 10 21:36:32 2013
@@ -26,15 +26,13 @@
#include "multiprogressdialog.h"
-MultiProgressDialog::MultiProgressDialog(QWidget* parent, Qt::WFlags f)
-: QDialog(parent, f)
+MultiProgressDialog::MultiProgressDialog(QWidget* parent) : QDialog(parent)
{
setupUi(this);
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(emitCancel()));
}
-MultiProgressDialog::MultiProgressDialog(const QString& titleText, const QString & cancelButtonText, QWidget* parent, Qt::WFlags f)
-: QDialog(parent, f)
+MultiProgressDialog::MultiProgressDialog(const QString& titleText, const QString & cancelButtonText, QWidget* parent) : QDialog(parent)
{
setupUi(this);
setWindowTitle(titleText);
Modified: trunk/Scribus/scribus/ui/multiprogressdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/multiprogressdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/multiprogressdialog.h (original)
+++ trunk/Scribus/scribus/ui/multiprogressdialog.h Sun Mar 10 21:36:32 2013
@@ -46,7 +46,7 @@
Q_OBJECT
public:
- MultiProgressDialog(QWidget* parent=0, Qt::WFlags f=0);
+ MultiProgressDialog(QWidget* parent=0);
/**
* Create a multi progress bar dialog for long operations with multiple steps. The dialog includes
* one standard progress bar, typically for the overall progress and others may be added easily.
@@ -55,8 +55,7 @@
* @param parent Parent widget for the dialog, commonly ScMW
* @param f Qt GUI flags
*/
- MultiProgressDialog(const QString& titleText, const QString & cancelButtonText,
- QWidget* parent=0, Qt::WFlags f=0);
+ MultiProgressDialog(const QString& titleText, const QString & cancelButtonText, QWidget* parent=0);
~MultiProgressDialog();
/**
Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp Sun Mar 10 21:36:32 2013
@@ -393,8 +393,13 @@
reportDisplay->setRootIsDecorated( true );
reportDisplay->setColumnCount(1);
reportDisplay->setHeaderLabel( tr("Element"));
+#ifdef USE_QT5
+ reportDisplay->header()->setSectionsClickable(false );
+ reportDisplay->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#else
reportDisplay->header()->setClickable( false );
reportDisplay->header()->setResizeMode( QHeaderView::ResizeToContents );
+#endif
reportDisplay->setSortingEnabled(false);
reportDisplay->setSelectionMode(QAbstractItemView::ExtendedSelection);
reportDisplay->setContextMenuPolicy(Qt::CustomContextMenu);
Modified: trunk/Scribus/scribus/ui/pageitemattributes.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/pageitemattributes.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pageitemattributes.cpp (original)
+++ trunk/Scribus/scribus/ui/pageitemattributes.cpp Sun Mar 10 21:36:32 2013
@@ -13,8 +13,7 @@
#include "ui/sctablewidget.h"
-PageItemAttributes::PageItemAttributes( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
- : QDialog(parent, fl)
+PageItemAttributes::PageItemAttributes( QWidget* parent, const char* name, bool modal) : QDialog(parent)
{
setupUi(this);
setModal(modal);
Modified: trunk/Scribus/scribus/ui/pageitemattributes.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/pageitemattributes.h
==============================================================================
--- trunk/Scribus/scribus/ui/pageitemattributes.h (original)
+++ trunk/Scribus/scribus/ui/pageitemattributes.h Sun Mar 10 21:36:32 2013
@@ -13,7 +13,7 @@
{
Q_OBJECT
public:
- PageItemAttributes( QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WFlags fl = 0 );
+ PageItemAttributes( QWidget* parent = 0, const char* name = 0, bool modal = false);
~PageItemAttributes();
virtual ObjAttrVector * getNewAttributes();
Modified: trunk/Scribus/scribus/ui/pagepalette_pages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.cpp Sun Mar 10 21:36:32 2013
@@ -43,12 +43,22 @@
masterPageList->setIconSize(QSize(60, 60));
QHeaderView *Header = pageView->verticalHeader();
+#ifdef USE_QT5
+ Header->setSectionsMovable(false);
+ Header->setSectionResizeMode(QHeaderView::Fixed);
+#else
Header->setMovable(false);
Header->setResizeMode(QHeaderView::Fixed);
+#endif
Header->hide();
Header = pageView->horizontalHeader();
+#ifdef USE_QT5
+ Header->setSectionsMovable(false);
+ Header->setSectionResizeMode(QHeaderView::Fixed);
+#else
Header->setMovable(false);
Header->setResizeMode(QHeaderView::Fixed);
+#endif
Header->hide();
pageView->setSortingEnabled(false);
pageView->setSelectionMode( QAbstractItemView::NoSelection );
Modified: trunk/Scribus/scribus/ui/paintmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/paintmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/paintmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/paintmanager.cpp Sun Mar 10 21:36:32 2013
@@ -575,7 +575,7 @@
{
QString patternName = origNames[it->text(0)];
QString newName = "";
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("Rename Entry"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("Rename Entry"));
dia.setEditText(it->text(0), true);
dia.setTestList(dialogPatterns.keys());
if (dia.exec())
@@ -1839,7 +1839,7 @@
QTreeWidgetItem* item = LoadColSet->currentItem();
QString NameK = item->data(0, Qt::UserRole).toString() + "/" + item->text(0);
QString Name = LoadColSet->text();
- Query* dia = new Query(this, "Name", 1, 0, tr("&Name:"), tr("Choose a Name"));
+ Query* dia = new Query(this, "Name", 1, tr("&Name:"), tr("Choose a Name"));
if ((customColSet.contains(NameK)) && (!paletteLocked))
dia->setEditText(Name, false);
else
Modified: trunk/Scribus/scribus/ui/patternpropsdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/patternpropsdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/patternpropsdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/patternpropsdialog.cpp Sun Mar 10 21:36:32 2013
@@ -135,8 +135,8 @@
QSpacerItem* hspacing = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
buttonLayout->addItem(hspacing);
buttonOk = new QPushButton( this );
- buttonOk->setAutoDefault( TRUE );
- buttonOk->setDefault( TRUE );
+ buttonOk->setAutoDefault( true );
+ buttonOk->setDefault( true );
buttonLayout->addWidget( buttonOk );
frame3Layout->addLayout( buttonLayout );
spinXoffset->setNewUnit(unitIndex);
Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp (original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp Sun Mar 10 21:36:32 2013
@@ -331,7 +331,7 @@
else
cSpace=colorSpaceText(currItem->pixm.imgInfo.colorspace);
displayColorspace->setText(cSpace);
- displayDPI->setText(QString("%1 x %2").arg(qRound(currItem->pixm.imgInfo.xres)).arg(qRound(currItem->pixm.imgInfo.yres)));
+ displayDPI->setText(QString("%1 x %2").arg(currItem->pixm.imgInfo.xres).arg(currItem->pixm.imgInfo.yres));
displayEffDPI->setText(QString("%1 x %2").arg(qRound(72.0 / currItem->imageXScale())).arg(qRound(72.0 / currItem->imageYScale())));
displaySizePixel->setText(QString("%1 x %2").arg(currItem->OrigW).arg(currItem->OrigH));
displayScale->setText(QString("%1 x %2 %").arg(currItem->imageXScale() * 100 / 72.0 * currItem->pixm.imgInfo.xres, 5, 'f', 1).arg(currItem->imageYScale() * 100 / 72.0 * currItem->pixm.imgInfo.yres, 5, 'f', 1));
Modified: trunk/Scribus/scribus/ui/prefs_fonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/prefs_fonts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_fonts.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_fonts.cpp Sun Mar 10 21:36:32 2013
@@ -57,9 +57,15 @@
fontSubstitutionsTableWidget->setSortingEnabled(false);
fontSubstitutionsTableWidget->setSelectionBehavior( QAbstractItemView::SelectRows );
QHeaderView *header = fontSubstitutionsTableWidget->horizontalHeader();
+#ifdef USE_QT5
+ header->setSectionsMovable(false);
+ header->setSectionsClickable(false);
+ header->setSectionResizeMode(QHeaderView::Stretch);
+#else
header->setMovable(false);
header->setClickable(false);
header->setResizeMode(QHeaderView::Stretch);
+#endif
fontSubstitutionsTableWidget->verticalHeader()->hide();
fontSubstitutionsTableWidget->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp Sun Mar 10 21:36:32 2013
@@ -160,7 +160,7 @@
int ecol;
if ( !doc.setContent( ts.readAll(), &errorMsg, &eline, &ecol ))
{
- qDebug("%s", QString("Could not open key set file: %1\nError:%2 at line: %3, row: %4").arg(filename).arg(errorMsg).arg(eline).arg(ecol).toAscii().constData());
+ qDebug("%s", QString("Could not open key set file: %1\nError:%2 at line: %3, row: %4").arg(filename).arg(errorMsg).arg(eline).arg(ecol).toLatin1().constData());
file1.close();
return;
}
@@ -269,7 +269,7 @@
if ( !doc.setContent( &file, &errorMsg, &eline, &ecol ))
{
- qDebug("%s", QString("Could not open key set file: %1\nError:%2 at line: %3, row: %4").arg(keySetsDir[fileCounter]).arg(errorMsg).arg(eline).arg(ecol).toAscii().constData());
+ qDebug("%s", QString("Could not open key set file: %1\nError:%2 at line: %3, row: %4").arg(keySetsDir[fileCounter]).arg(errorMsg).arg(eline).arg(ecol).toLatin1().constData());
file.close();
continue;
}
@@ -288,8 +288,11 @@
return QStringList();
}
-QString Prefs_KeyboardShortcuts::getKeyText(int KeyC)
-{
+QString Prefs_KeyboardShortcuts::getKeyText(QKeySequence KeyC)
+{
+#ifdef USE_QT5
+ return KeyC.toString();
+#else
if ((KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT)) == 0)
return "";
// on OSX Qt translates modifiers to forsaken symbols, arrows and the like
@@ -304,10 +307,14 @@
if ((KeyC & Qt::SHIFT) != 0)
res += "Shift+";
return res + QString(QKeySequence(KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT)));
-}
-
-QString Prefs_KeyboardShortcuts::getTrKeyText(int KeyC)
-{
+#endif
+}
+
+QString Prefs_KeyboardShortcuts::getTrKeyText(QKeySequence KeyC)
+{
+#ifdef USE_QT5
+ return KeyC.toString();
+#else
if ((KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT)) == 0)
return "";
// on OSX Qt translates modifiers to forsaken symbols, arrows and the like
@@ -322,6 +329,7 @@
if ((KeyC & Qt::SHIFT) != 0)
res += CommonStrings::shiftModifier + "+";
return res + QString(QKeySequence(KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT)));
+#endif
}
void Prefs_KeyboardShortcuts::setKeyText()
@@ -384,7 +392,11 @@
Q_CHECK_PTR(currLVI);
lviToActionMap.insert(currLVI, *it);
currLVI->setText(0, keyMap[*it].cleanMenuText);
+#ifdef USE_QT5
+ currLVI->setText(1, keyMap[*it].keySequence.toString());
+#else
currLVI->setText(1, keyMap[*it].keySequence);
+#endif
prevLVI=currLVI;
}
}
@@ -418,7 +430,11 @@
Q_CHECK_PTR(currLVI);
lviToActionMap.insert(currLVI, *it);
currLVI->setText(0, keyMap[*it].cleanMenuText);
+#ifdef USE_QT5
+ currLVI->setText(1, keyMap[*it].keySequence.toString());
+#else
currLVI->setText(1, keyMap[*it].keySequence);
+#endif
prevLVI=currLVI;
}
}
@@ -454,7 +470,11 @@
QString actionName=lviToActionMap[qlvi];
if (actionName.isEmpty())
return;
+#ifdef USE_QT5
+ keyDisplay->setText(keyMap[actionName].keySequence.toString());
+#else
keyDisplay->setText(keyMap[actionName].keySequence);
+#endif
if (keyMap[actionName].keySequence.isEmpty())
noKey->setChecked(true);
else
@@ -527,13 +547,22 @@
.arg(getTrKeyText(keyCode))
.arg(getAction(keyCode)),
CommonStrings::tr_OK);
+#ifdef USE_QT5
+ selectedLVI->setText(1,keyMap[lviToActionMap[selectedLVI]].keySequence.toString());
+ keyDisplay->setText(keyMap[lviToActionMap[selectedLVI]].keySequence.toString());
+#else
selectedLVI->setText(1,keyMap[lviToActionMap[selectedLVI]].keySequence);
keyDisplay->setText(keyMap[lviToActionMap[selectedLVI]].keySequence);
+#endif
}
else
{
QKeySequence newKeySequence(keyCode);
+#ifdef USE_QT5
+ selectedLVI->setText(1, newKeySequence.toString());
+#else
selectedLVI->setText(1, QString(newKeySequence));
+#endif
keyMap[lviToActionMap[selectedLVI]].keySequence=newKeySequence;
userDef->setChecked(true);
}
Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h (original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h Sun Mar 10 21:36:32 2013
@@ -35,8 +35,8 @@
void keyPressEvent(QKeyEvent *k);
void keyReleaseEvent(QKeyEvent *k);
- static QString getKeyText(int KeyC);
- static QString getTrKeyText(int KeyC);
+ static QString getKeyText(QKeySequence KeyC);
+ static QString getTrKeyText(QKeySequence KeyC);
public slots:
void languageChange();
Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp Sun Mar 10 21:36:32 2013
@@ -912,11 +912,11 @@
void Prefs_PDFExport::setCustomRenderingWidgetsShown(bool visible)
{
- useCustomRenderingCheckBox->setShown(visible);
- customRenderingColorComboBox->setShown(visible);
- customRenderingFrequencySpinBox->setShown(visible);
- customRenderingAngleSpinBox->setShown(visible);
- customRenderingSpotFunctionComboBox->setShown(visible);
+ useCustomRenderingCheckBox->setVisible(visible);
+ customRenderingColorComboBox->setVisible(visible);
+ customRenderingFrequencySpinBox->setVisible(visible);
+ customRenderingAngleSpinBox->setVisible(visible);
+ customRenderingSpotFunctionComboBox->setVisible(visible);
}
void Prefs_PDFExport::enableCustomRenderingWidgets(bool enabled)
@@ -929,17 +929,17 @@
void Prefs_PDFExport::setSolidsImagesWidgetsShown(bool visible)
{
- solidColorsLabel->setShown(visible);
- solidColorsLine->setShown(visible);
- useSolidColorProfileCheckBox->setShown(visible);
- solidColorProfileComboBox->setShown(visible);
- solidColorRenderingIntentComboBox->setShown(visible);
- imagesLabel->setShown(visible);
- imagesLine->setShown(visible);
- useImageProfileCheckBox->setShown(visible);
- doNotUseEmbeddedImageProfileCheckBox->setShown(visible);
- imageProfileComboBox->setShown(visible);
- imageRenderingIntentComboBox->setShown(visible);
+ solidColorsLabel->setVisible(visible);
+ solidColorsLine->setVisible(visible);
+ useSolidColorProfileCheckBox->setVisible(visible);
+ solidColorProfileComboBox->setVisible(visible);
+ solidColorRenderingIntentComboBox->setVisible(visible);
+ imagesLabel->setVisible(visible);
+ imagesLine->setVisible(visible);
+ useImageProfileCheckBox->setVisible(visible);
+ doNotUseEmbeddedImageProfileCheckBox->setVisible(visible);
+ imageProfileComboBox->setVisible(visible);
+ imageRenderingIntentComboBox->setVisible(visible);
}
void Prefs_PDFExport::enableSolidsImagesWidgets(bool enabled)
Modified: trunk/Scribus/scribus/ui/preview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/preview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preview.cpp (original)
+++ trunk/Scribus/scribus/ui/preview.cpp Sun Mar 10 21:36:32 2013
@@ -154,9 +154,13 @@
Table->setHorizontalHeaderItem(1, new QTableWidgetItem( tr("Separation Name")));
QHeaderView *header = Table->horizontalHeader();
header->setStretchLastSection(true);
+#ifdef USE_QT5
+ header->setSectionsMovable(false);
+ header->setSectionResizeMode(QHeaderView::Fixed);
+#else
header->setMovable(false);
-// header->setClickable(false);
header->setResizeMode(QHeaderView::Fixed);
+#endif
Table->setColumnWidth(0, 24);
Table->verticalHeader()->hide();
Table->setSelectionMode( QAbstractItemView::NoSelection );
@@ -630,7 +634,7 @@
args.append( "-q" );
args.append( "-dNOPAUSE" );
args.append( "-dPARANOIDSAFER" );
- args.append( QString("-r%1").arg(tmp.setNum(qRound(Res))) );
+ args.append( QString("-r%1").arg(tmp.setNum(Res)) );
args.append( QString("-g%1x%2").arg(tmp2.setNum(qRound(b))).arg(tmp3.setNum(qRound(h))) );
if (EnableCMYK->isChecked())
{
@@ -743,7 +747,7 @@
args1.append( "-q" );
args1.append( "-dNOPAUSE" );
args1.append( "-dPARANOIDSAFER" );
- args1.append( QString("-r%1").arg(tmp.setNum(qRound(Res))) );
+ args1.append( QString("-r%1").arg(tmp.setNum(Res)) );
args1.append( QString("-g%1x%2").arg(tmp2.setNum(qRound(b))).arg(tmp3.setNum(qRound(h))) );
if (AntiAlias->isChecked())
{
Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Sun Mar 10 21:36:32 2013
@@ -310,7 +310,7 @@
if (!toFile)
{
if( !PrinterUtil::getDefaultSettings(PrintDest->currentText(), DevMode) )
- qWarning( tr("Failed to retrieve printer settings").toAscii().data() );
+ qWarning( tr("Failed to retrieve printer settings").toLatin1().data() );
}
#endif
if (toFile && LineEdit1->text().isEmpty())
Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp Sun Mar 10 21:36:32 2013
@@ -462,8 +462,8 @@
imageYOffsetSpinBox->blockSignals(true);
imageRotation->blockSignals(true);
- imgEffectsButton->setShown(m_item->PictureIsAvailable && m_item->isRaster);
- imgExtProperties->setShown(m_item->PictureIsAvailable && m_item->pixm.imgInfo.valid);
+ imgEffectsButton->setVisible(m_item->PictureIsAvailable && m_item->isRaster);
+ imgExtProperties->setVisible(m_item->PictureIsAvailable && m_item->pixm.imgInfo.valid);
bool setter = m_item->ScaleType;
freeScale->setChecked(setter);
frameScale->setChecked(!setter);
Modified: trunk/Scribus/scribus/ui/query.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/query.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/query.cpp (original)
+++ trunk/Scribus/scribus/ui/query.cpp Sun Mar 10 21:36:32 2013
@@ -16,8 +16,7 @@
#include "commonstrings.h"
#include "util_icon.h"
-Query::Query( QWidget* parent, const char* name, bool modal, Qt::WFlags fl, QString text, QString titel )
- : QDialog( parent )
+Query::Query( QWidget* parent, const char* name, bool modal, QString text, QString titel ) : QDialog( parent )
{
setWindowTitle( titel );
setWindowIcon(loadIcon("AppIcon.png"));
Modified: trunk/Scribus/scribus/ui/query.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/query.h
==============================================================================
--- trunk/Scribus/scribus/ui/query.h (original)
+++ trunk/Scribus/scribus/ui/query.h Sun Mar 10 21:36:32 2013
@@ -23,8 +23,7 @@
Q_OBJECT
public:
- Query( QWidget* parent=0, const char* name=0, bool modal = FALSE, Qt::WFlags fl=0, QString text=0,
- QString titel=0 );
+ Query( QWidget* parent=0, const char* name=0, bool modal = false, QString text=0, QString titel=0 );
~Query() {};
const QString getEditText();
Modified: trunk/Scribus/scribus/ui/replacecolors.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/replacecolors.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/replacecolors.cpp (original)
+++ trunk/Scribus/scribus/ui/replacecolors.cpp Sun Mar 10 21:36:32 2013
@@ -46,13 +46,24 @@
rgbIcon = loadIcon("rgb.png", true);
spotIcon = loadIcon("spot.png", true);
regIcon = loadIcon("register.png", true);
+#ifdef USE_QT5
+ replacementTable->horizontalHeader()->setSectionsClickable(false );
+ replacementTable->horizontalHeader()->setSectionsMovable( false );
+ replacementTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+#else
replacementTable->horizontalHeader()->setMovable(false);
replacementTable->horizontalHeader()->setClickable(false);
replacementTable->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+#endif
replacementTable->setHorizontalHeaderItem(0, new QTableWidgetItem( tr("Original")));
replacementTable->setHorizontalHeaderItem(1, new QTableWidgetItem( tr("Replacement")));
+#ifdef USE_QT5
+ replacementTable->verticalHeader()->setSectionsMovable( false );
+ replacementTable->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
+#else
replacementTable->verticalHeader()->setMovable(false);
replacementTable->verticalHeader()->setResizeMode(QHeaderView::Fixed);
+#endif
replacementTable->verticalHeader()->hide();
replacementTable->setIconSize(QSize(60, 15));
updateReplacementTable();
Modified: trunk/Scribus/scribus/ui/scdockpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/scdockpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/scdockpalette.cpp Sun Mar 10 21:36:32 2013
@@ -39,8 +39,11 @@
#include "util.h"
#include "util_icon.h"
-
+#ifdef USE_QT5
+ScDockPalette::ScDockPalette( QWidget * parent, const QString& prefsContext, Qt::WindowFlags f)
+#else
ScDockPalette::ScDockPalette( QWidget * parent, const QString& prefsContext, Qt::WFlags f)
+#endif
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
: QDockWidget ( parent, f | Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint ),
#else
@@ -118,7 +121,6 @@
{
storeVisibility(visible);
storeDockState();
-// setShown(visible);
if (!visible)
hide();
else if (!isVisible())
Modified: trunk/Scribus/scribus/ui/scdockpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/scdockpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.h (original)
+++ trunk/Scribus/scribus/ui/scdockpalette.h Sun Mar 10 21:36:32 2013
@@ -40,7 +40,11 @@
Q_OBJECT
public:
+#ifdef USE_QT5
+ ScDockPalette( QWidget * parent = NULL, const QString& prefsContext = QString::null, Qt::WindowFlags f = 0 );
+#else
ScDockPalette( QWidget * parent = NULL, const QString& prefsContext = QString::null, Qt::WFlags f = 0 );
+#endif
~ScDockPalette() {};
/** @brief Sample way to grab keystrokes, simply calls superclass at this point */
//virtual void keyPressEvent(QKeyEvent *keyEvent);
Modified: trunk/Scribus/scribus/ui/scinputdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/scinputdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scinputdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/scinputdialog.cpp Sun Mar 10 21:36:32 2013
@@ -18,14 +18,13 @@
#include "util.h"
#include "util_icon.h"
-ScInputDialog::ScInputDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
- : QDialog( parent )
+ScInputDialog::ScInputDialog( QWidget* parent, const char* name, bool modal) : QDialog( parent )
{
if ( !name )
setObjectName( "ScInputDialog" );
setModal(modal);
setWindowIcon(QIcon(loadIcon ( "AppIcon.png" )));
- setSizeGripEnabled( TRUE );
+ setSizeGripEnabled( true );
ScInputDialogLayout = new QVBoxLayout( this );
ScInputDialogLayout->setMargin(10);
ScInputDialogLayout->setSpacing(5);
@@ -48,12 +47,12 @@
buttonLayout->addItem(hspacing);
buttonOk = new QPushButton( this );
- buttonOk->setAutoDefault( TRUE );
- buttonOk->setDefault( TRUE );
+ buttonOk->setAutoDefault( true );
+ buttonOk->setDefault( true );
buttonLayout->addWidget( buttonOk );
buttonCancel = new QPushButton( this );
- buttonCancel->setAutoDefault( TRUE );
+ buttonCancel->setAutoDefault( true );
buttonLayout->addWidget( buttonCancel );
ScInputDialogLayout->addLayout(labelEntryLayout);
@@ -90,7 +89,7 @@
QString suffix, bool *ok,
QWidget *parent, const char *name )
{
- ScInputDialog *dlg = new ScInputDialog(parent, name, TRUE);
+ ScInputDialog *dlg = new ScInputDialog(parent, name, true);
dlg->setWindowTitle( caption );
dlg->entryLabel->setText(label);
dlg->entrySpin->setValues(0.0, 1000.0, decimals, num);
Modified: trunk/Scribus/scribus/ui/scinputdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/scinputdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/scinputdialog.h (original)
+++ trunk/Scribus/scribus/ui/scinputdialog.h Sun Mar 10 21:36:32 2013
@@ -27,7 +27,7 @@
Q_OBJECT
public:
- ScInputDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
+ ScInputDialog( QWidget* parent = 0, const char* name = 0, bool modal = false);
~ScInputDialog(){};
virtual void changeEvent(QEvent *e);
Modified: trunk/Scribus/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.cpp Sun Mar 10 21:36:32 2013
@@ -32,6 +32,8 @@
#include <QToolTip>
#include <QPainter>
#include <QProgressDialog>
+#include <QDrag>
+#include <QMimeData>
#include "commonstrings.h"
#include "cmsettings.h"
@@ -1060,7 +1062,7 @@
BibView* bv = (BibView*)Frame3->widget(id);
if (bv->objectMap.contains(nam))
{
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("New Entry"));
dia.setValidator(QRegExp("[\\w()]+"));
dia.setEditText(nam, true);
dia.setTestList(activeBView->objectMap.keys());
@@ -1249,7 +1251,7 @@
QPixmap ObjPreview;
QListWidgetItem *ite = actItem;
QString OldName = ite->text();
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Name"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("New Name"));
dia.setValidator(QRegExp("[\\w()]+"));
dia.setEditText(ite->text(), true);
dia.setTestList(activeBView->objectMap.keys());
@@ -1378,7 +1380,7 @@
if (activeBView->objectMap.contains(nam))
nam += "("+ tmp.setNum(tempCount) + ")";
}
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("New Entry"));
dia.setValidator(QRegExp("[\\w()]+"));
dia.setEditText(nam, true);
dia.setTestList(activeBView->objectMap.keys());
@@ -1506,7 +1508,7 @@
if (activeBView->objectMap.contains(nam))
nam += "("+ tmp.setNum(tempCount) + ")";
}
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("New Entry"));
dia.setValidator(QRegExp("[\\w()]+"));
dia.setEditText(nam, true);
dia.setTestList(activeBView->objectMap.keys());
@@ -1669,7 +1671,7 @@
nam = tr("Object") + tmp.setNum(actBView->objectMap.count());
if (actBView->objectMap.contains(nam))
nam += "("+ tmp.setNum(tempCount) + ")";
- Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
+ Query dia(this, "tt", 1, tr("&Name:"), tr("New Entry"));
dia.setValidator(QRegExp("[\\w()]+"));
dia.setEditText(nam, true);
dia.setTestList(activeBView->objectMap.keys());
Modified: trunk/Scribus/scribus/ui/scrpalettebase.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/scrpalettebase.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrpalettebase.cpp (original)
+++ trunk/Scribus/scribus/ui/scrpalettebase.cpp Sun Mar 10 21:36:32 2013
@@ -38,8 +38,11 @@
#include "util.h"
#include "util_icon.h"
-
+#ifdef USE_QT5
+ScrPaletteBase::ScrPaletteBase( QWidget * parent, const QString& prefsContext, bool modal, Qt::WindowFlags f)
+#else
ScrPaletteBase::ScrPaletteBase( QWidget * parent, const QString& prefsContext, bool modal, Qt::WFlags f)
+#endif
#if QT_VERSION >= 0x040500
: QDialog ( parent, f | Qt::Tool | Qt::CustomizeWindowHint
| Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint
@@ -95,7 +98,6 @@
void ScrPaletteBase::startup()
{
setFontSize();
-// setShown(visibleOnStartup);
if (visibleOnStartup)
show();
else
@@ -106,7 +108,6 @@
void ScrPaletteBase::setPaletteShown(bool visible)
{
storeVisibility(visible);
-// setShown(visible);
if (!visible)
hide();
else if (!isVisible())
Modified: trunk/Scribus/scribus/ui/scrpalettebase.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/scrpalettebase.h
==============================================================================
--- trunk/Scribus/scribus/ui/scrpalettebase.h (original)
+++ trunk/Scribus/scribus/ui/scrpalettebase.h Sun Mar 10 21:36:32 2013
@@ -40,7 +40,11 @@
Q_OBJECT
public:
+#ifdef USE_QT5
+ ScrPaletteBase( QWidget * parent = NULL, const QString& prefsContext = QString::null, bool modal = false, Qt::WindowFlags f = 0 );
+#else
ScrPaletteBase( QWidget * parent = NULL, const QString& prefsContext = QString::null, bool modal = false, Qt::WFlags f = 0 );
+#endif
~ScrPaletteBase() {};
/** @brief Sample way to grab keystrokes, simply calls superclass at this point */
//virtual void keyPressEvent(QKeyEvent *keyEvent);
Modified: trunk/Scribus/scribus/ui/sctextbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/sctextbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctextbrowser.cpp (original)
+++ trunk/Scribus/scribus/ui/sctextbrowser.cpp Sun Mar 10 21:36:32 2013
@@ -29,7 +29,7 @@
void ScTextBrowser::clear()
{
- setHtml(QString::fromAscii("<html></html>"));
+ setHtml(QString::fromLatin1("<html></html>"));
}
void ScTextBrowser::setSimpleText(const QString& str)
Modified: trunk/Scribus/scribus/ui/sctreewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/sctreewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/sctreewidget.cpp Sun Mar 10 21:36:32 2013
@@ -99,7 +99,11 @@
setRootIsDecorated(false);
setIndentation(0);
header()->hide();
+#ifdef USE_QT5
+ header()->setSectionResizeMode(QHeaderView::Stretch);
+#else
header()->setResizeMode(QHeaderView::Stretch);
+#endif
viewport()->setBackgroundRole(QPalette::Window);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
m_toolbox_mode = false;
Modified: trunk/Scribus/scribus/ui/shadebutton.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/shadebutton.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/shadebutton.cpp (original)
+++ trunk/Scribus/scribus/ui/shadebutton.cpp Sun Mar 10 21:36:32 2013
@@ -46,7 +46,7 @@
if (c == 0)
{
- Query dia(this, "New", 1, 0, tr("&Shade:"), tr("Shade"));
+ Query dia(this, "New", 1, tr("&Shade:"), tr("Shade"));
if (dia.exec())
{
c = dia.getEditText().toInt(&ok);
Modified: trunk/Scribus/scribus/ui/shortcutwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/shortcutwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/shortcutwidget.cpp (original)
+++ trunk/Scribus/scribus/ui/shortcutwidget.cpp Sun Mar 10 21:36:32 2013
@@ -157,7 +157,7 @@
res += "Alt+";
if ((KeyC & Qt::SHIFT) != 0)
res += "Shift+";
- return res + QString(QKeySequence(KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT)));
+ return res + QString(QKeySequence(KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT)).toString());
}
void ShortcutWidget::setKeyText()
Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp Sun Mar 10 21:36:32 2013
@@ -982,7 +982,7 @@
}
else
{
- optMarginParentButton->setShown(!inhO);
+ optMarginParentButton->setVisible(!inhO);
if(om == ParagraphStyle::OM_Default)
optMarginRadioBoth->setChecked(true,
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Sun Mar 10 21:36:32 2013
@@ -1630,7 +1630,7 @@
vheight = qMax( gStrut.height(), scr.height() - vtop );
setGeometry(vleft, vtop, vwidth, vheight);
QByteArray state = "";
- state = prefs->get("winstate","").toAscii();
+ state = prefs->get("winstate","").toLatin1();
if (!state.isEmpty())
restoreState(QByteArray::fromBase64(state));
int side = prefs->getInt("side", -1);
Modified: trunk/Scribus/scribus/ui/symbolpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/symbolpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/symbolpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/symbolpalette.cpp Sun Mar 10 21:36:32 2013
@@ -23,6 +23,8 @@
#include "symbolpalette.h"
#include <QPainter>
#include <QByteArray>
+#include <QDrag>
+#include <QMimeData>
#include "scpattern.h"
#include "scribusdoc.h"
#include "scribus.h"
Modified: trunk/Scribus/scribus/ui/tablesideselector.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/tablesideselector.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tablesideselector.cpp (original)
+++ trunk/Scribus/scribus/ui/tablesideselector.cpp Sun Mar 10 21:36:32 2013
@@ -100,14 +100,22 @@
void TableSideSelector::mousePressEvent(QMouseEvent* event)
{
+#ifdef USE_QT5
+ m_selection ^= closestSide(event->localPos());
+#else
m_selection ^= closestSide(event->posF());
+#endif
update();
emit selectionChanged();
}
void TableSideSelector::mouseMoveEvent(QMouseEvent* event)
{
+#ifdef USE_QT5
+ m_highlighted = closestSide(event->localPos());
+#else
m_highlighted = closestSide(event->posF());
+#endif
update();
}
Modified: trunk/Scribus/scribus/ui/transparencypalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/transparencypalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/transparencypalette.cpp (original)
+++ trunk/Scribus/scribus/ui/transparencypalette.cpp Sun Mar 10 21:36:32 2013
@@ -581,6 +581,7 @@
currentUnit = unitIndex;
}
+#ifndef USE_QT5
void Tpalette::changeEvent(QEvent *e)
{
if (e->type() == QEvent::LanguageChange)
@@ -590,3 +591,4 @@
else
QWidget::changeEvent(e);
}
+#endif
Modified: trunk/Scribus/scribus/ui/transparencypalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/ui/transparencypalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/transparencypalette.h (original)
+++ trunk/Scribus/scribus/ui/transparencypalette.h Sun Mar 10 21:36:32 2013
@@ -58,8 +58,10 @@
public:
Tpalette(QWidget* parent);
~Tpalette() {};
-
+
+#ifndef USE_QT5
virtual void changeEvent(QEvent *e);
+#endif
void setDocument(ScribusDoc* doc);
void setCurrentItem(PageItem* item);
Modified: trunk/Scribus/scribus/undogui.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/undogui.cpp
==============================================================================
--- trunk/Scribus/scribus/undogui.cpp (original)
+++ trunk/Scribus/scribus/undogui.cpp Sun Mar 10 21:36:32 2013
@@ -37,15 +37,18 @@
#include "scraction.h"
#include "util_icon.h"
+#ifdef USE_QT5
+UndoGui::UndoGui(QWidget* parent, const char* name, Qt::WindowFlags f) : ScDockPalette(parent, name, f)
+#else
UndoGui::UndoGui(QWidget* parent, const char* name, Qt::WFlags f) : ScDockPalette(parent, name, f)
+#endif
{
setWindowTitle( tr("Action History"));
}
/*** UndoWidget ***************************************************************/
-UndoWidget::UndoWidget(QWidget* parent, const char* name)
-: UndoGui(parent, name)
+UndoWidget::UndoWidget(QWidget* parent, const char* name) : UndoGui(parent, name)
{
/* BnF standard toolbar buttons
QHBoxLayout* layout = new QHBoxLayout(this, 0, 0, "layout");
@@ -225,8 +228,7 @@
/*** UndoPalette **************************************************************/
-UndoPalette::UndoPalette(QWidget* parent, const char* name)
-: UndoGui(parent, name)
+UndoPalette::UndoPalette(QWidget* parent, const char* name) : UndoGui(parent, name)
{
setObjectName(QString::fromLocal8Bit(name));
setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
Modified: trunk/Scribus/scribus/undogui.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/undogui.h
==============================================================================
--- trunk/Scribus/scribus/undogui.h (original)
+++ trunk/Scribus/scribus/undogui.h Sun Mar 10 21:36:32 2013
@@ -67,7 +67,11 @@
* @param name Name of the object
* @param f widget flags
*/
+#ifdef USE_QT5
+ UndoGui(QWidget* parent = 0, const char* name = "UndoGui", Qt::WindowFlags f = 0);
+#else
UndoGui(QWidget* parent = 0, const char* name = "UndoGui", Qt::WFlags f = 0);
+#endif
/** @brief Destroys the widget */
virtual ~UndoGui() {};
Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp (original)
+++ trunk/Scribus/scribus/util.cpp Sun Mar 10 21:36:32 2013
@@ -51,7 +51,7 @@
void sDebug(QString message)
{
- qDebug("%s", message.toAscii().constData());
+ qDebug("%s", message.toLatin1().constData());
}
int System(const QString exename, const QStringList & args, const QString fileStdErr, const QString fileStdOut, bool* cancel)
@@ -759,7 +759,7 @@
void tDebug(QString message)
{
QDateTime debugTime;
- qDebug("%s", QString("%1\t%2").arg(debugTime.currentDateTime().toString("hh:mm:ss:zzz")).arg(message).toAscii().constData());
+ qDebug("%s", QString("%1\t%2").arg(debugTime.currentDateTime().toString("hh:mm:ss:zzz")).arg(message).toLatin1().constData());
}
@@ -989,8 +989,8 @@
char* outbuf = 0;
size_t length = 0;
int status = 0;
- outbuf = abi::__cxa_demangle(mName.trimmed().toAscii().data(), outbuf, &length, &status);
- name = QString::fromAscii( outbuf );
+ outbuf = abi::__cxa_demangle(mName.trimmed().toLatin1().data(), outbuf, &length, &status);
+ name = QString::fromLatin1( outbuf );
if(0 == status)
{
// qDebug()<<"Demangle success["<< length <<"]"<<name;
Modified: trunk/Scribus/scribus/util_ghostscript.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/util_ghostscript.cpp
==============================================================================
--- trunk/Scribus/scribus/util_ghostscript.cpp (original)
+++ trunk/Scribus/scribus/util_ghostscript.cpp Sun Mar 10 21:36:32 2013
@@ -96,7 +96,7 @@
args += args_in;
args.append("-c");
args.append("showpage");
-// qDebug(args.join(" ").toAscii());
+// qDebug(args.join(" ").toLatin1());
return System( getShortPathName(prefsManager->ghostscriptExecutable()), args );
}
Modified: trunk/Scribus/scribus/util_icon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/util_icon.cpp
==============================================================================
--- trunk/Scribus/scribus/util_icon.cpp (original)
+++ trunk/Scribus/scribus/util_icon.cpp Sun Mar 10 21:36:32 2013
@@ -42,12 +42,12 @@
QPixmap *pm = new QPixmap();
if (!QFile::exists(iconFilePath))
- qWarning("Unable to load icon %s: File not found", iconFilePath.toAscii().constData());
+ qWarning("Unable to load icon %s: File not found", iconFilePath.toLatin1().constData());
else
{
pm->load(iconFilePath);
if (pm->isNull())
- qWarning("Unable to load icon %s: Got null pixmap", iconFilePath.toAscii().constData());
+ qWarning("Unable to load icon %s: Got null pixmap", iconFilePath.toLatin1().constData());
if (PrefsManager::instance()->appPrefs.uiPrefs.grayscaleIcons && !forceUseColor)
iconToGrayscale(pm);
}
Modified: trunk/Scribus/scribus/util_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18194&path=/trunk/Scribus/scribus/util_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/util_printer.cpp (original)
+++ trunk/Scribus/scribus/util_printer.cpp Sun Mar 10 21:36:32 2013
@@ -277,7 +277,7 @@
dc = CreateDCW( NULL, (LPCWSTR) printerName.utf16(), NULL, NULL );
if ( !dc )
{
- qWarning("isPostscriptPrinter() failed to create device context for %s", printerName.toAscii().data());
+ qWarning("isPostscriptPrinter() failed to create device context for %s", printerName.toLatin1().data());
return false;
}
// test if printer support the POSTSCRIPT_PASSTHROUGH escape code
More information about the scribus-commit
mailing list