1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-23 06:41:08 +00:00

Merge remote-tracking branch 'marcrbouvier/master'

This commit is contained in:
Marc Zinnschlag 2013-09-06 08:44:59 +02:00
commit 3d66f7521e

View File

@ -10,7 +10,7 @@
CS::Editor::Editor() : mViewManager (mDocumentManager) CS::Editor::Editor() : mViewManager (mDocumentManager)
{ {
mIpcServerName = "org.openmw.OpenCS"; mIpcServerName = "org.openmw.OpenCS";
connect (&mViewManager, SIGNAL (newDocumentRequest ()), this, SLOT (createDocument ())); connect (&mViewManager, SIGNAL (newDocumentRequest ()), this, SLOT (createDocument ()));
connect (&mViewManager, SIGNAL (loadDocumentRequest ()), this, SLOT (loadDocument ())); connect (&mViewManager, SIGNAL (loadDocumentRequest ()), this, SLOT (loadDocument ()));
@ -120,31 +120,31 @@ void CS::Editor::createNewFile()
void CS::Editor::showStartup() void CS::Editor::showStartup()
{ {
if(mStartup.isHidden()) if(mStartup.isHidden())
mStartup.show(); mStartup.show();
mStartup.raise(); mStartup.raise();
mStartup.activateWindow(); mStartup.activateWindow();
} }
bool CS::Editor::makeIPCServer() bool CS::Editor::makeIPCServer()
{ {
mServer = new QLocalServer(this); mServer = new QLocalServer(this);
if(mServer->listen(mIpcServerName)) if(mServer->listen(mIpcServerName))
{ {
connect(mServer, SIGNAL(newConnection()), this, SLOT(showStartup())); connect(mServer, SIGNAL(newConnection()), this, SLOT(showStartup()));
return true; return true;
} }
mServer->close(); mServer->close();
return false; return false;
} }
void CS::Editor::connectToIPCServer() void CS::Editor::connectToIPCServer()
{ {
mClientSocket = new QLocalSocket(this); mClientSocket = new QLocalSocket(this);
mClientSocket->connectToServer(mIpcServerName); mClientSocket->connectToServer(mIpcServerName);
mClientSocket->close(); mClientSocket->close();
} }
int CS::Editor::run() int CS::Editor::run()