From: Abdelrazak Younes Date: Mon, 2 Jun 2008 14:19:39 +0000 (+0000) Subject: Remove bug work around due to bad event loop startup process in 1.5. X-Git-Tag: 1.6.10~4558 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b5f4c9359972d3416cc66290a4e74ae3d8e0d520;p=features.git Remove bug work around due to bad event loop startup process in 1.5. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25071 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/LyX.cpp b/src/LyX.cpp index c41d16579a..ed84179346 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -524,17 +524,6 @@ int LyX::init(int & argc, char * argv[]) } -void LyX::addFileToLoad(string const & fname) -{ - vector::const_iterator cit = find( - pimpl_->files_to_load_.begin(), pimpl_->files_to_load_.end(), - fname); - - if (cit == pimpl_->files_to_load_.end()) - pimpl_->files_to_load_.push_back(fname); -} - - bool LyX::loadFiles() { LASSERT(!use_gui, /**/); diff --git a/src/LyX.h b/src/LyX.h index cee66fa102..1ec9143571 100644 --- a/src/LyX.h +++ b/src/LyX.h @@ -99,9 +99,6 @@ public: /// Execute batch commands if available. void execBatchCommands(); - /// - void addFileToLoad(std::string const &); - private: /// noncopyable LyX(LyX const &); diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 104f69a0b3..732d25ff67 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -865,17 +865,8 @@ bool GuiApplication::event(QEvent * e) case QEvent::FileOpen: { // Open a file; this happens only on Mac OS X for now QFileOpenEvent * foe = static_cast(e); - - if (!current_view_ || !current_view_->view()) - // The application is not properly initialized yet. - // So we acknowledge the event and delay the file opening - // until LyX is ready. - // FIXME UNICODE: FileName accept an utf8 encoded string. - LyX::ref().addFileToLoad(fromqstr(foe->file())); - else - lyx::dispatch(FuncRequest(LFUN_FILE_OPEN, - qstring_to_ucs4(foe->file()))); - + lyx::dispatch(FuncRequest(LFUN_FILE_OPEN, + qstring_to_ucs4(foe->file()))); e->accept(); return true; }