Hi, i cooked few patches for you: * remove hunspell ==> basically, you just need to remove all references to the bundled hunspell in texstudio.pro and use system headers instead of bundled ones. * force the use of xdg-open for viewers, this patch should be upstreamed or at least, fix function x11desktop_env() to recognize more desktops than just KDE (most desktop sets DESKTOP_SESSION environment variable which comes from freesdesktop). But using xdg-open is more flexible and allow users choosing their preferred viewer. * for qtsingleapplication, it provides a features configuration file, so qmake will automagically configure this for you if you add "qtsingleapplication" to CONFIG variable Btw, you should drop BuildRequires: gcc-objc++ as it's completely useless. best regards, H.
From 2ae917fad7cd4e5d3043e3ab3f1cfe4faa63f532 Mon Sep 17 00:00:00 2001 From: Haikel Guemar <haikel.guemar@xxxxxxxxxxx> Date: Thu, 28 Jul 2011 16:55:32 +0200 Subject: [PATCH 1/3] viewers: use xdg-open --- buildmanager.cpp | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/buildmanager.cpp b/buildmanager.cpp index 1441564..d8986bb 100644 --- a/buildmanager.cpp +++ b/buildmanager.cpp @@ -460,23 +460,11 @@ QString BuildManager::guessCommandName(LatexCommand cmd) { // kdvi "file:%.dvi#src:@ %.tex" switch (cmd) { case CMD_VIEWDVI: - switch (x11desktop_env()) { - case 3: return "kdvi %.dvi > /dev/null"; - case 4: return "okular %.dvi > /dev/null"; - default:return "evince %.dvi > /dev/null"; - }; + return "xdg-open %.dvi > /dev/null"; case CMD_VIEWPS: - switch (x11desktop_env()) { - case 3: return "kghostview %.ps > /dev/null"; - case 4: return "okular %.ps > /dev/null"; - default:return "evince %.ps > /dev/null"; - }; + return "xdg-open %.ps > /dev/null"; case CMD_VIEWPDF: - switch (x11desktop_env()) { - case 3: return "kpdf %.pdf > /dev/null"; - case 4: return "okular %.pdf > /dev/null"; - default:return "evince %.pdf > /dev/null"; - }; + return "xdg-open %.pdf > /dev/null"; default:; } #endif @@ -610,7 +598,7 @@ void BuildManager::setLatexCommand(LatexCommand cmd, const QString &cmdString){ ((unquote == baseName) || ( (unquote.endsWith(QDir::separator() + baseName) || unquote.endsWith("/" + baseName)) && (!unquote.contains(" ") || (!unquote.contains('"') && unquote != trimmed)) //spaces mean options, if not everything is quoted - && (QFileInfo(unquote).exists()) + && (QFileInfo(unquote).exists()) ) )) commands[cmd] = cmdString + " " + defaultCommandOptions(cmd); @@ -619,7 +607,7 @@ void BuildManager::setLatexCommand(LatexCommand cmd, const QString &cmdString){ } } -QString BuildManager::getLatexCommand(LatexCommand cmd){ +QString BuildManager::getLatexCommand(LatexCommand cmd){ return commands[cmd]; } QString BuildManager::getLatexCommandForDisplay(LatexCommand cmd){ -- 1.7.4.4
From e14c4085029e89da0006a83e72e20e8da29092fd Mon Sep 17 00:00:00 2001 From: Haikel Guemar <haikel.guemar@xxxxxxxxxxx> Date: Thu, 28 Jul 2011 17:01:34 +0200 Subject: [PATCH 2/3] use system hunspell instead of bundled one --- spellerutility.h | 2 +- texstudio.pro | 38 +++++++------------------------------- 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/spellerutility.h b/spellerutility.h index 730920e..bb996e2 100644 --- a/spellerutility.h +++ b/spellerutility.h @@ -13,7 +13,7 @@ #include "mostQtHeaders.h" -#include "hunspell/hunspell.hxx" +#include <hunspell.hxx> class SpellerUtility: public QObject { Q_OBJECT public: diff --git a/texstudio.pro b/texstudio.pro index 437a376..c0b67da 100644 --- a/texstudio.pro +++ b/texstudio.pro @@ -55,24 +55,6 @@ HEADERS += texmaker.h \ codesnippet.h \ thesaurusdialog.h \ xmltagslistwidget.h \ - hunspell/affentry.hxx \ - hunspell/affixmgr.hxx \ - hunspell/atypes.hxx \ - hunspell/baseaffix.hxx \ - hunspell/csutil.hxx \ - hunspell/dictmgr.hxx \ - hunspell/hashmgr.hxx \ - hunspell/htypes.hxx \ - hunspell/hunspell.hxx \ - hunspell/hunspell.h \ - hunspell/langnum.hxx \ - hunspell/license.hunspell \ - hunspell/phonet.hxx \ - hunspell/suggestmgr.hxx \ - hunspell/license.myspell \ - hunspell/filemgr.hxx \ - hunspell/hunzip.hxx \ - hunspell/w_char.hxx \ qcodeedit/lib/qeditorinputbinding.h \ qcodeedit/lib/qeditorinputbindinginterface.h \ randomtextgenerator.h \ @@ -88,7 +70,6 @@ HEADERS += texmaker.h \ latexdocument.h \ unicodeinsertion.h \ universalinputdialog.h \ - hunspell/replist.hxx \ scriptengine.h \ insertgraphics.h \ tmxtabwidget.h \ @@ -142,18 +123,6 @@ SOURCES += main.cpp \ codesnippet.cpp \ thesaurusdialog.cpp \ xmltagslistwidget.cpp \ - hunspell/affentry.cxx \ - hunspell/affixmgr.cxx \ - hunspell/csutil.cxx \ - hunspell/dictmgr.cxx \ - hunspell/hashmgr.cxx \ - hunspell/hunspell.cxx \ - hunspell/phonet.cxx \ - hunspell/replist.cxx \ - hunspell/suggestmgr.cxx \ - hunspell/utf_info.cxx \ - hunspell/filemgr.cxx \ - hunspell/hunzip.cxx \ encodingdialog.cpp \ qcodeedit/lib/qeditorinputbinding.cpp \ randomtextgenerator.cpp \ @@ -528,3 +497,10 @@ SOURCES+=synctex_parser_utils.c synctex_parser.c #QMAKE_CXXFLAGS_DEBUG += -Werror -Wall -Wextra -Winit-self -Wmain -Wmissing-include-dirs -Wtrigraphs -Wunused -Wunknown-pragmas -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Wclobbered -Wempty-body -Wsign-compare -Waddress -Wlogical-op -Winline QMAKE_CXXFLAGS_DEBUG += -Wall -Wextra -Winit-self -Wmain -Wmissing-include-dirs -Wtrigraphs -Wunused -Wunknown-pragmas -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Wclobbered -Wempty-body -Wsign-compare -Waddress -Wlogical-op -Winline + +# enable use of pkgconfig +unix { + CONFIG += link_pkgconfig + # use system hunspell + PKGCONFIG += hunspell +} \ No newline at end of file -- 1.7.4.4
From 15100e67881ac6ba99e4c29baaa4cb2baa62c3be Mon Sep 17 00:00:00 2001 From: Haikel Guemar <haikel.guemar@xxxxxxxxxxx> Date: Thu, 28 Jul 2011 17:07:49 +0200 Subject: [PATCH 3/3] use system qtsingleapplication instead of bundled one --- texstudio.pro | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/texstudio.pro b/texstudio.pro index c0b67da..0c1d9f1 100644 --- a/texstudio.pro +++ b/texstudio.pro @@ -14,8 +14,6 @@ QT += network \ QT += phonon DEFINES += PHONON } -contains($$list($$[QT_VERSION]), 4.3.*):message("qt 4.3.x") -else:include(qtsingleapplication/qtsingleapplication.pri) # ############################## PRECOMPILED_HEADER = mostQtHeaders.h @@ -503,4 +501,7 @@ unix { CONFIG += link_pkgconfig # use system hunspell PKGCONFIG += hunspell -} \ No newline at end of file +} + +# use system qtsingleapplication +CONFIG += qtsingleapplication \ No newline at end of file -- 1.7.4.4
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel