Explorar o código

Merge branches 'python-console-refactor' and 'ctkSettingsDialog-instantiate-settings'

* python-console-refactor: (42 commits)
  ctkPythonConsole - Import the interactive help module
  ctkConsole/ctkPythonConsole - Handle standardinput from ctkConsole
  ctkPythonConsole - Implement AutocompletePreferenceList
  ctkConsoleCompleter - Add AutocompletePreferenceList
  ctkPythonConsole - Autocompleter - Add parenthesis if it applies
  Auto-completion within PythonConsole now considers __main__.__builtins__
  Now possible to lookup python attributes in a nested module.
  ctkConsole - Rename TextBackgroundColor into BackgroundColor
  Exclude ctkScriptingPythonCore library from PythonQt wrapping
  ctkSimplePythonShell/CMakeLists.txt - Use CTK_WRAPPED_LIBRARIES_PYTHONQT
  Add ctkPythonConsole designer plugin
  ctkPythonConsole - Add "initialize(ctkAbstractPythonManager*)" method
  Within ctk and qt python module, hide variable CTK_VERBOSE_IMPORT from user
  ctkConsole - If it applies, maintain scrollArea to the bottom when resizing
  ctkPythonConsole - Enable SplitCopiedTextByLine property
  Add ctkConsole::SplitCopiedTextByLine property
  ctkPythonConsole - disable RemoveTrailingSpaces and AutomaticIndentation
  Add ctkConsole::textBackgroundColor property
  Add ctkConsole::ScrollBarPolicy property
  ctkConsole - Factorize by building layout within init() function
  ...

* ctkSettingsDialog-instantiate-settings:
  Instantiate a QSettings within ctkSettingsDialog
Jean-Christophe Fillion-Robin %!s(int64=14) %!d(string=hai) anos
pai
achega
c0ed8330bd

+ 4 - 0
CMakeExternals/QtMobility.cmake

@@ -60,8 +60,12 @@ IF(${add_project})
       CONFIGURE_FILE("${qtmobility_config_in}" "${qtmobility_config_out}" @ONLY)
     ELSEIF(WIN32)
       SET(qtmobility_make_cmd nmake)
+      SET(qtmobility_servicefw_libname_debug QtServiceFrameworkd.lib)
+      SET(qtmobility_servicefw_libname_release QtServiceFramework.lib)
       IF(MINGW AND NOT MSYS)
         SET(qtmobility_make_cmd mingw32-make)
+        SET(qtmobility_servicefw_libname_debug libQtServiceFrameworkd.a)
+        SET(qtmobility_servicefw_libname_release libQtServiceFramework.a)
       ENDIF()
 
       SET(qtmobility_win32_install_prefix "${ep_source_dir}/${proj}/install/")

+ 19 - 1
Libs/PluginFramework/Testing/Cpp/ctkPluginFrameworkTestRunner.cpp

@@ -199,7 +199,25 @@ void ctkPluginFrameworkTestRunner::addPluginPath(const QString& path, bool insta
   Q_D(ctkPluginFrameworkTestRunner);
   d->pluginPaths.push_back(qMakePair(path, install));
 #ifdef _WIN32
-  if(_putenv_s("PATH", path.toLatin1().data()))
+#ifdef __MINGW32__
+  QString pathVar("PATH");
+  QString oldPath(getenv("PATH"));
+  pathVar += "=" + oldPath + ";" + path;
+  if(_putenv(qPrintable(pathVar)))
+#else
+  std::size_t bufferLength;
+  getenv_s(&bufferLength, NULL, 0, "PATH");
+  QString newPath = path;
+  if (bufferLength > 0)
+  {
+    char* oldPath = new char[bufferLength];
+	getenv_s(&bufferLength, oldPath, bufferLength, "PATH");
+	newPath.append(";").append(oldPath);
+	delete[] oldPath;
+  }
+  qDebug() << "new PATH:" << newPath;
+  if(_putenv_s("PATH", qPrintable(newPath)))
+#endif
   {
     LPVOID lpMsgBuf;
     DWORD dw = GetLastError(); 

+ 4 - 2
Libs/Widgets/ctkSettingsDialog.cpp

@@ -66,6 +66,9 @@ ctkSettingsDialogPrivate::ctkSettingsDialogPrivate(ctkSettingsDialog& object)
 void ctkSettingsDialogPrivate::init()
 {
   Q_Q(ctkSettingsDialog);
+
+  this->Settings = new QSettings(q);
+
   this->setupUi(q);
 
   QObject::connect(this->SettingsTreeWidget,
@@ -277,8 +280,7 @@ void ctkSettingsDialog
 {
   Q_D(ctkSettingsDialog);
   Q_UNUSED(previousItem);
-  d->SettingsStackedWidget->setCurrentWidget(
-    d->panel(currentItem));
+  d->SettingsStackedWidget->setCurrentWidget(d->panel(currentItem));
 }
 
 // --------------------------------------------------------------------------

+ 1 - 0
Libs/Widgets/ctkSettingsPanel.cpp

@@ -154,6 +154,7 @@ void ctkSettingsPanel::updateProperties()
       {
       QVariant value = d->Settings->value(key);
       PropertyType& prop = d->Properties[key];
+      // Update object registered using registerProperty()
       bool res = prop.setValue(value);
       Q_ASSERT(res);
       Q_UNUSED(res);

+ 3 - 2
Utilities/QtMobility/QtMobility-1.0.0-install-win32.cmake.in

@@ -27,9 +27,10 @@ FOREACH(_file ${_files})
 ENDFOREACH()
 
 SET(QTMOBILITY_QTSERVICEFW_INCLUDE_DIR "@qtmobility_win32_install_prefix@/include")
+
 SET(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG
-    "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/QtServiceFrameworkd.lib")
+    "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/@qtmobility_servicefw_libname_debug@")
 SET(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE
-    "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/QtServiceFramework.lib")
+    "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/@qtmobility_servicefw_libname_release@")
     
 CONFIGURE_FILE("@qtmobility_config_in@" "@qtmobility_config_out@" @ONLY)