mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
Using Regex to remove invalid Filename Charecters
This commit is contained in:
parent
aa95fdb742
commit
e16742fe4e
@ -13,7 +13,7 @@ SingleApplication::SingleApplication(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
QString serverName = QApplication::organizationName() +
|
QString serverName = QApplication::organizationName() +
|
||||||
QApplication::applicationName();
|
QApplication::applicationName();
|
||||||
serverName.replace(QRegExp("\\s"), "");
|
serverName.replace(QRegExp("[^\\w\\-. ]"), "");
|
||||||
|
|
||||||
// Attempt to connect to the LocalServer
|
// Attempt to connect to the LocalServer
|
||||||
socket = new QLocalSocket();
|
socket = new QLocalSocket();
|
||||||
|
Loading…
Reference in New Issue
Block a user