LAN connection: fixed a bug that prevented to use IP numbers like "100".

GUI: never use native menubar in order to prevent the menubar from not showing up.
merge-requests/1/head
Teuniz 2015-11-22 10:31:29 +01:00
rodzic b96477bef7
commit f97a71b47d
3 zmienionych plików z 27 dodań i 8 usunięć

Wyświetl plik

@ -33,7 +33,7 @@
#define PROGRAM_NAME "DSRemote"
#define PROGRAM_VERSION "0.31_1511141207"
#define PROGRAM_VERSION "0.31_1511221022"
#define MAX_PATHLEN 4096

Wyświetl plik

@ -109,20 +109,37 @@ void UI_Mainwindow::open_connection()
goto OUT_ERROR;
}
int cf = 0;
for(i=0; i<len; i++)
{
if(dev_str[i] == '.')
{
cf = 0;
}
if(dev_str[i] == '0')
{
if((dev_str[i+1] != 0) && (dev_str[i+1] != '.'))
if(cf == 0)
{
for(j=i; j<len; j++)
if((dev_str[i+1] != 0) && (dev_str[i+1] != '.'))
{
dev_str[j] = dev_str[j+1];
for(j=i; j<len; j++)
{
dev_str[j] = dev_str[j+1];
}
i--;
len--;
}
i--;
len--;
}
}
else
{
if(dev_str[i] != '.')
{
cf = 1;
}
}
}

Wyświetl plik

@ -54,6 +54,8 @@ UI_Mainwindow::UI_Mainwindow()
setlocale(LC_NUMERIC, "C");
QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
QCoreApplication::setOrganizationName("TvB");
QCoreApplication::setOrganizationDomain("teuniz.net");
QCoreApplication::setApplicationName(PROGRAM_NAME);