summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Rodríguez <crrodriguez@opensuse.org>2016-02-22 10:14:22 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2016-02-22 10:14:22 +0100
commit3fbf22ea46345c2faec5cd9f193fd656b28a93be (patch)
tree903b2d6871692fe4822afb4e4c2293ce9d129b07
parentc6ad9068b3a0f8092927678ada9f2012900ad2a2 (diff)
Port qphotorec to QT5
-rw-r--r--configure.ac19
-rw-r--r--src/qphotorec.cpp5
2 files changed, 13 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 45a59c9..9388b7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ AC_PREREQ([2.59])
AC_INIT([testdisk],[7.1-WIP],[grenier@cgsecurity.org])
AC_LANG(C)
sinclude(acx_pthread.m4)
-TESTDISKDATE="January 2016"
+TESTDISKDATE="February 2016"
AC_SUBST(TESTDISKDATE)
AC_DEFINE_UNQUOTED([TESTDISKDATE],"$TESTDISKDATE",[Date of release])
AC_CONFIG_AUX_DIR(config)
@@ -843,7 +843,7 @@ done
unset option
AC_LANG_PUSH([C++])
-for option in -Wall -MD -Wpointer-arith -Wmissing-declarations -Wshadow -Wwrite-strings -W -Wcast-align -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Winline -Wdisabled-optimization -Wmissing-format-attribute -Wmultichar -Wformat=2
+for option in -Wall -MD -Wpointer-arith -Wmissing-declarations -Wshadow -Wwrite-strings -W -Wcast-align -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Winline -Wdisabled-optimization -Wmissing-format-attribute -Wmultichar -Wformat=2 -fvisibility=hidden -fvisibility-inlines-hidden -fPIC
do
SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $option"
@@ -898,19 +898,20 @@ AC_CHECK_FUNCS([ntfs_libntfs_version ntfs_volume_startup])
if test "$use_qt" = "true";
then
- PKG_CHECK_MODULES(QTGUI, [QtGui >= 4.0.1],,use_qt=false)
- AC_CHECK_TOOLS(MOC,[moc-qt4 moc],)
+ PKG_CHECK_MODULES(QTGUI, [Qt5Gui >= 5.0.0],,use_qt=false)
+ PKG_CHECK_MODULES(QTWIDGETS, [Qt5Widgets >= 5.0.0],,use_qt=false)
+ AC_CHECK_TOOLS(MOC,[moc-qt5 moc],)
if test x$MOC = x ; then
- AC_MSG_WARN(Could not find a moc-qt4 or moc tool in your PATH.)
+ AC_MSG_WARN(Could not find a moc-qt5 or moc tool in your PATH.)
use_qt=false
fi
- AC_CHECK_TOOLS(RCC,[rcc-qt4 rcc],)
+ AC_CHECK_TOOLS(RCC,[rcc-qt5 rcc],)
if test x$RCC = x ; then
- AC_MSG_WARN(Could not find a rcc-qt4 or rcc tool in your PATH.)
+ AC_MSG_WARN(Could not find a rcc-qt5 or rcc tool in your PATH.)
use_qt=false
fi
- qphotorec_LDADD="$qphotorec_LDADD $QTGUI_LIBS"
- qphotorec_CXXFLAGS="$qphotorec_CXXFLAGS $QTGUI_CFLAGS"
+ qphotorec_LDADD="$qphotorec_LDADD $QTGUI_LIBS $QTWIDGETS_LIBS"
+ qphotorec_CXXFLAGS="$qphotorec_CXXFLAGS $QTGUI_CFLAGS $QTWIDGETS_CFLAGS"
fi
AM_CONDITIONAL(USEQT, test "$use_qt" = true)
if test "$win_target" = yes;
diff --git a/src/qphotorec.cpp b/src/qphotorec.cpp
index c4ffd89..57b1293 100644
--- a/src/qphotorec.cpp
+++ b/src/qphotorec.cpp
@@ -638,9 +638,10 @@ void QPhotorec::qphotorec_search_updateUI()
const partition_t *partition=params->partition;
const unsigned int sector_size=params->disk->sector_size;
QString tmp;
- folder_txt->setText("Destination: <a href=\"file://" + Qt::escape(directoryLabel->text()) + "/" +
+ QString txt = QString(directoryLabel->text()).toHtmlEscaped();
+ folder_txt->setText("Destination: <a href=\"file://" + txt + "/" +
DEFAULT_RECUP_DIR + "." + QString::number(params->dir_num) + "\">" +
- Qt::escape(directoryLabel->text()) + "</a>");
+ txt + "</a>");
if(params->status==STATUS_QUIT)
{
tmp.sprintf("Recovery completed");