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
This commit is contained in:
Abdelrazak Younes 2008-06-02 14:19:39 +00:00
parent 2003a50e14
commit b5f4c93599
3 changed files with 2 additions and 25 deletions

View File

@ -524,17 +524,6 @@ int LyX::init(int & argc, char * argv[])
} }
void LyX::addFileToLoad(string const & fname)
{
vector<string>::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() bool LyX::loadFiles()
{ {
LASSERT(!use_gui, /**/); LASSERT(!use_gui, /**/);

View File

@ -99,9 +99,6 @@ public:
/// Execute batch commands if available. /// Execute batch commands if available.
void execBatchCommands(); void execBatchCommands();
///
void addFileToLoad(std::string const &);
private: private:
/// noncopyable /// noncopyable
LyX(LyX const &); LyX(LyX const &);

View File

@ -865,17 +865,8 @@ bool GuiApplication::event(QEvent * e)
case QEvent::FileOpen: { case QEvent::FileOpen: {
// Open a file; this happens only on Mac OS X for now // Open a file; this happens only on Mac OS X for now
QFileOpenEvent * foe = static_cast<QFileOpenEvent *>(e); QFileOpenEvent * foe = static_cast<QFileOpenEvent *>(e);
lyx::dispatch(FuncRequest(LFUN_FILE_OPEN,
if (!current_view_ || !current_view_->view()) qstring_to_ucs4(foe->file())));
// 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())));
e->accept(); e->accept();
return true; return true;
} }