From c33185746bf6f831c7ca09d3aee4ff22b0cf7cf4 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 7 Oct 2015 09:43:02 +0200 Subject: [PATCH] Windows: fix signal connections using STD_SHARED_PTR. won't work, reason unknown --- src/qtgui/rclmain_w.cpp | 17 ++++++++++++++++- src/qtgui/ssearch_w.cpp | 4 +++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp index 34ddcb79..992e9d0f 100644 --- a/src/qtgui/rclmain_w.cpp +++ b/src/qtgui/rclmain_w.cpp @@ -287,11 +287,15 @@ void RclMain::init() connect(&m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(idxStatus())); +#ifdef _WIN32 + connect(sSearch, SIGNAL(startSearch(std::shared_ptr, bool)), + this, SLOT(startSearch(std::shared_ptr, bool))); +#else connect(sSearch, SIGNAL(startSearch(STD_SHARED_PTR, bool)), this, SLOT(startSearch(STD_SHARED_PTR, bool))); +#endif connect(sSearch, SIGNAL(clearSearch()), this, SLOT(resetSearch())); - connect(preferencesMenu, SIGNAL(triggered(QAction*)), this, SLOT(setStemLang(QAction*))); connect(preferencesMenu, SIGNAL(aboutToShow()), @@ -348,8 +352,14 @@ void RclMain::init() restable->setRclMain(this, true); connect(actionSaveResultsAsCSV, SIGNAL(triggered()), restable, SLOT(saveAsCSV())); +#ifdef _WIN32 + connect(this, SIGNAL(docSourceChanged(std::shared_ptr)), + restable, SLOT(setDocSource(std::shared_ptr))); +#else connect(this, SIGNAL(docSourceChanged(STD_SHARED_PTR)), restable, SLOT(setDocSource(STD_SHARED_PTR))); +#endif + connect(this, SIGNAL(searchReset()), restable, SLOT(resetSource())); connect(this, SIGNAL(resultsReady()), @@ -378,8 +388,13 @@ void RclMain::init() this, SLOT(showSnippets(Rcl::Doc))); reslist->setRclMain(this, true); +#ifdef _WIN32 + connect(this, SIGNAL(docSourceChanged(std::shared_ptr)), + reslist, SLOT(setDocSource(std::shared_ptr))); +#else connect(this, SIGNAL(docSourceChanged(STD_SHARED_PTR)), reslist, SLOT(setDocSource(STD_SHARED_PTR))); +#endif connect(firstPageAction, SIGNAL(triggered()), reslist, SLOT(resultPageFirst())); connect(prevPageAction, SIGNAL(triggered()), diff --git a/src/qtgui/ssearch_w.cpp b/src/qtgui/ssearch_w.cpp index 17658671..283bc5de 100644 --- a/src/qtgui/ssearch_w.cpp +++ b/src/qtgui/ssearch_w.cpp @@ -14,8 +14,11 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "autoconfig.h" + #include #include +#include MEMORY_INCLUDE #include #include @@ -34,7 +37,6 @@ #include "guiutils.h" #include "searchdata.h" #include "ssearch_w.h" -#include MEMORY_INCLUDE #include "textsplit.h" #include "wasatorcl.h" #include "rclhelp.h"