286 |
{ |
{ |
287 |
QTextStream out(stderr); |
QTextStream out(stderr); |
288 |
const QString sEol = "\n\n"; |
const QString sEol = "\n\n"; |
|
int iCmdArgs = 0; |
|
289 |
const int argc = args.count(); |
const int argc = args.count(); |
290 |
|
int iCmdArgs = 0; |
291 |
|
|
292 |
for (int i = 1; i < argc; i++) { |
for (int i = 1; i < argc; ++i) { |
293 |
|
|
294 |
if (iCmdArgs > 0) { |
if (iCmdArgs > 0) { |
295 |
sSessionFile += " "; |
sSessionFile += " "; |
296 |
sSessionFile += args.at(i); |
sSessionFile += args.at(i); |
297 |
iCmdArgs++; |
++iCmdArgs; |
298 |
continue; |
continue; |
299 |
} |
} |
300 |
|
|
321 |
} |
} |
322 |
sServerHost = sVal; |
sServerHost = sVal; |
323 |
if (iEqual < 0) |
if (iEqual < 0) |
324 |
i++; |
++i; |
325 |
} |
} |
326 |
else if (sArg == "-p" || sArg == "--port") { |
else if (sArg == "-p" || sArg == "--port") { |
327 |
if (sVal.isNull()) { |
if (sVal.isNull()) { |
330 |
} |
} |
331 |
iServerPort = sVal.toInt(); |
iServerPort = sVal.toInt(); |
332 |
if (iEqual < 0) |
if (iEqual < 0) |
333 |
i++; |
++i; |
334 |
} |
} |
335 |
else if (sArg == "-?" || sArg == "--help") { |
else if (sArg == "-?" || sArg == "--help") { |
336 |
print_usage(args.at(0)); |
print_usage(args.at(0)); |
356 |
// If we don't have one by now, |
// If we don't have one by now, |
357 |
// this will be the startup sesion file... |
// this will be the startup sesion file... |
358 |
sSessionFile += sArg; |
sSessionFile += sArg; |
359 |
iCmdArgs++; |
++iCmdArgs; |
360 |
} |
} |
361 |
} |
} |
362 |
|
|
374 |
if (pWidget) { |
if (pWidget) { |
375 |
// if (bVisible) pWidget->show(); -- force initial exposure? |
// if (bVisible) pWidget->show(); -- force initial exposure? |
376 |
m_settings.beginGroup("/Geometry/" + pWidget->objectName()); |
m_settings.beginGroup("/Geometry/" + pWidget->objectName()); |
377 |
#if QT_VERSION >= 0x050000 |
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) |
378 |
const QByteArray& geometry |
const QByteArray& geometry |
379 |
= m_settings.value("/geometry").toByteArray(); |
= m_settings.value("/geometry").toByteArray(); |
380 |
if (!geometry.isEmpty()) |
if (!geometry.isEmpty()) |
411 |
// only save the form geometry while its up and visible) |
// only save the form geometry while its up and visible) |
412 |
if (pWidget) { |
if (pWidget) { |
413 |
m_settings.beginGroup("/Geometry/" + pWidget->objectName()); |
m_settings.beginGroup("/Geometry/" + pWidget->objectName()); |
414 |
#if QT_VERSION >= 0x050000 |
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) |
415 |
m_settings.setValue("/geometry", pWidget->saveGeometry()); |
m_settings.setValue("/geometry", pWidget->saveGeometry()); |
416 |
#else//--SAVE_OLD_GEOMETRY |
#else//--SAVE_OLD_GEOMETRY |
417 |
const QPoint& wpos = pWidget->pos(); |
const QPoint& wpos = pWidget->pos(); |