Commit e3569335 authored by cyrush's avatar cyrush
Browse files

merged glib linux init hang fix from 2.0RC

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@10143 18c085ea-50e0-402c-830e-de6fd14e8384
parent bc5b0449
......@@ -26,7 +26,7 @@ VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/5.0.0d/${VISITARCH}/lib/vtk-
## Specify the Qt4 binary dir.
## (qmake us used to locate & setup Qt4 dependencies)
##
VISIT_OPTION_DEFAULT(VISIT_QT_BIN /home/harrison37/apps/Trolltech/Qt-4.5.2/bin)
VISIT_OPTION_DEFAULT(VISIT_QT_BIN /home/harrison37/apps/Trolltech/Qt-4.6.1/bin)
##
## Specify the location of the python.
......@@ -36,10 +36,12 @@ VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/2.5/${VISITARCH})
##
## Compiler flags.
##
SET(CMAKE_BUILD_TYPE Debug)
VISIT_OPTION_DEFAULT(VISIT_C_COMPILER gcc)
VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER g++)
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS "")
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-Wno-deprecated")
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS "-fvisibility=hidden")
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-Wno-deprecated -fPIC -fvisibility=hidden")
##
## Parallel Build Setup.
......@@ -47,6 +49,7 @@ VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-Wno-deprecated")
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON)
VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER mpic++)
##############################################################
##
## Database reader plugin support libraries
......@@ -87,12 +90,12 @@ VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal/1.3.2/${VISITARCH})
##
## H5Part
##
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/1.4.2/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/1.6.0/${VISITARCH})
##
## FastBit
##
VISIT_OPTION_DEFAULT(VISIT_FASTBIT_DIR ${VISITHOME}/fastbit/1.0.9/${VISITARCH})
## FastBit (failed to build on beetown)
##
#VISIT_OPTION_DEFAULT(VISIT_FASTBIT_DIR ${VISITHOME}/fastbit/1.0.9/${VISITARCH})
##
## HDF4
......@@ -103,7 +106,7 @@ VISIT_OPTION_DEFAULT(VISIT_HDF4_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz
##
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.2/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.4/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz)
##
......@@ -129,7 +132,7 @@ VISIT_OPTION_DEFAULT(VISIT_CCMIO_DIR ${VISITHOME}/ccmio/2.6.1/${VISITARCH})
##
## Silo
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.7/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.7.2/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP})
##
......
......@@ -597,6 +597,10 @@ GUI_LogQtMessages(QtMsgType type, const char *msg)
// Brad Whitlock, Tue Mar 2 16:49:19 PST 2010
// Don't call setColorSpec for now.
//
// Cyrus Harrison, Fri Mar 5 10:28:42 PST 2010
// Use Queued signal/slot connection instead of QTimer::singleShot for
// init to work around a Qt/Glib init problem in linux.
//
// ****************************************************************************
QvisGUIApplication::QvisGUIApplication(int &argc, char **argv) :
......@@ -890,8 +894,14 @@ QvisGUIApplication::QvisGUIApplication(int &argc, char **argv) :
//
// Start the heavy duty initialization from within the event loop.
// Emitting a signal connected to the Init() slot via a Queued
// connection accomplishes this.
//
QTimer::singleShot(10, this, SLOT(HeavyInitialization()));
connect(this,SIGNAL(FireInit(int)),
this, SLOT(Init(int)),
Qt::QueuedConnection);
emit FireInit(0); // 0 for HeavyInit
visitTimer->StopTimer(total, "QvisGUIApplication constuctor");
}
......@@ -1011,6 +1021,31 @@ QvisGUIApplication::~QvisGUIApplication()
delete localSettings;
}
// ****************************************************************************
// Method: QvisGUIApplication::Init
//
// Purpose:
// This slot calls HeavyInit or FinalInit.
// It is a replacement/work around for using QTimer::singleShot to provide
// interactive startup. On X11 with Qt 4.5 & Qt 4.6 the QTimer::singleShot
// approach hangs in the GLib event loop waiting for mouse events.
//
// Programmer: Cyrus Harrison
// Creation: Fri Mar 5 09:43:17 PST 2010
//
// Modifications:
//
// ****************************************************************************
void
QvisGUIApplication::Init(int stage)
{
if(stage ==0)
HeavyInitialization();
else if(stage == 1)
FinalInitialization();
}
// ****************************************************************************
// Method: QvisGUIApplication::HeavyInitialization
//
......@@ -1041,6 +1076,10 @@ QvisGUIApplication::~QvisGUIApplication()
// Brad Whitlock, Tue Jun 24 11:46:31 PDT 2008
// Change how the plugin managers get initialized.
//
// Cyrus Harrison, Fri Mar 5 10:28:42 PST 2010
// Emit FireInit signal instead of using QTimer::singleShot to
// work around a Qt/Glib init problem in linux.
//
// ****************************************************************************
void
......@@ -1055,7 +1094,7 @@ QvisGUIApplication::HeavyInitialization()
if(heavyInitStage == 0)
stagedInit = visitTimer->StartTimer();
timeid = visitTimer->StartTimer();
debug4 << "QvisGUIApplication::HeavyInitialization: heavyInitStage="
<< heavyInitStage << endl;
......@@ -1189,7 +1228,7 @@ QvisGUIApplication::HeavyInitialization()
{
if(gotoNextStage)
++heavyInitStage;
QTimer::singleShot(10, this, SLOT(HeavyInitialization()));
emit FireInit(0);
}
else
visitTimer->StopTimer(stagedInit, "HeavyInitialization");
......@@ -1314,6 +1353,10 @@ QvisGUIApplication::Synchronize(int tag)
// current path from fileServer instead of '.', as '.' evaluates to the
// install dir on Windows, and users may not have write access.
//
// Cyrus Harrison, Fri Mar 5 10:28:42 PST 2010
// Emit FireInit signal instead of using QTimer::singleShot to
// work around a Qt/Glib init problem in linux.
//
// ****************************************************************************
void
......@@ -1321,7 +1364,7 @@ QvisGUIApplication::HandleSynchronize(int val)
{
if(val == VIEWER_READY_TAG)
{
QTimer::singleShot(10, this, SLOT(FinalInitialization()));
emit FireInit(1);
}
else if(val == SET_FILE_HIGHLIGHT_TAG)
{
......@@ -1505,7 +1548,11 @@ QvisGUIApplication::ClientMethodCallback(Subject *s, void *data)
//
// Gunther H. Weber, Fri Aug 15 10:47:43 PDT 2008
// Bug fix: Check for system visitrc file when determining whether loading
// the file should be delayed.
// the file should be delayed.
//
// Cyrus Harrison, Fri Mar 5 10:28:42 PST 2010
// Emit FireInit signal instead of using QTimer::singleShot to
// work around a Qt/Glib init problem in linux.
//
// ****************************************************************************
......@@ -1710,7 +1757,7 @@ QvisGUIApplication::FinalInitialization()
if(moreInit)
{
++initStage;
QTimer::singleShot(10, this, SLOT(FinalInitialization()));
emit FireInit(1);
}
}
......
......@@ -329,6 +329,9 @@ class SplashScreen;
// Gunther H. Weber, Fri Aug 15 10:22:13 PDT 2008
// Added methods for initiating and synchronizing repick.
//
// Cyrus Harrison, Fri Mar 5 10:28:42 PST 2010
// Added FireInit & Init to work around a Qt/Glib init problem in linux.
//
// ****************************************************************************
class GUI_API QvisGUIApplication : public QObject, public ConfigManager, public GUIBase
......@@ -339,6 +342,9 @@ public:
~QvisGUIApplication();
int Exec();
signals:
void FireInit(int stage);
private:
void AddViewerArguments(int argc, char **argv);
void AddViewerSpaceArguments();
......@@ -398,16 +404,19 @@ private:
void RestoreCrashRecoveryFile();
void RemoveCrashRecoveryFile(bool) const;
QString CrashRecoveryFile() const;
void ExtractSystemDefaultAppearance();
public slots:
void newExpression();
void SaveCrashRecoveryFile();
void Interpret(const QString &);
void redoPick();
void restorePickAttributesAfterRepick();
private slots:
void Init(int stage);
void Quit();
void HeavyInitialization();
void ReadFromViewer(int);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment