Remove Windows-breaking change that fixes Mac-warnings
This commit is contained in:
parent
645a0c9d56
commit
ee11f5cafa
|
@ -91,19 +91,19 @@ void Screen::saveSettings(QSettings& settings) const
|
||||||
|
|
||||||
QTextStream& Screen::writeScreensSection(QTextStream& outStream) const
|
QTextStream& Screen::writeScreensSection(QTextStream& outStream) const
|
||||||
{
|
{
|
||||||
outStream << "\t" << name() << ":" << Qt::endl;
|
outStream << "\t" << name() << ":" << endl;
|
||||||
|
|
||||||
for (int i = 0; i < modifiers().size(); i++) {
|
for (int i = 0; i < modifiers().size(); i++) {
|
||||||
auto mod = static_cast<Modifier>(i);
|
auto mod = static_cast<Modifier>(i);
|
||||||
if (modifier(mod) != mod) {
|
if (modifier(mod) != mod) {
|
||||||
outStream << "\t\t" << modifierName(mod) << " = " << modifierName(modifier(mod))
|
outStream << "\t\t" << modifierName(mod) << " = " << modifierName(modifier(mod))
|
||||||
<< Qt::endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < fixes().size(); i++) {
|
for (int i = 0; i < fixes().size(); i++) {
|
||||||
auto fix = static_cast<Fix>(i);
|
auto fix = static_cast<Fix>(i);
|
||||||
outStream << "\t\t" << fixName(fix) << " = " << (fixes()[i] ? "true" : "false") << Qt::endl;
|
outStream << "\t\t" << fixName(fix) << " = " << (fixes()[i] ? "true" : "false") << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
outStream << "\t\t" << "switchCorners = none ";
|
outStream << "\t\t" << "switchCorners = none ";
|
||||||
|
@ -112,9 +112,9 @@ QTextStream& Screen::writeScreensSection(QTextStream& outStream) const
|
||||||
outStream << "+" << switchCornerName(static_cast<SwitchCorner>(i)) << " ";
|
outStream << "+" << switchCornerName(static_cast<SwitchCorner>(i)) << " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outStream << Qt::endl;
|
outStream << endl;
|
||||||
|
|
||||||
outStream << "\t\t" << "switchCornerSize = " << switchCornerSize() << Qt::endl;
|
outStream << "\t\t" << "switchCornerSize = " << switchCornerSize() << endl;
|
||||||
|
|
||||||
return outStream;
|
return outStream;
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,56 +210,56 @@ int ServerConfig::adjacentScreenIndex(int idx, int deltaColumn, int deltaRow) co
|
||||||
|
|
||||||
QTextStream& operator<<(QTextStream& outStream, const ServerConfig& config)
|
QTextStream& operator<<(QTextStream& outStream, const ServerConfig& config)
|
||||||
{
|
{
|
||||||
outStream << "section: screens" << Qt::endl;
|
outStream << "section: screens" << endl;
|
||||||
|
|
||||||
for (const Screen& s : config.screens()) {
|
for (const Screen& s : config.screens()) {
|
||||||
if (!s.isNull())
|
if (!s.isNull())
|
||||||
s.writeScreensSection(outStream);
|
s.writeScreensSection(outStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
outStream << "end" << Qt::endl << Qt::endl;
|
outStream << "end" << endl << endl;
|
||||||
|
|
||||||
outStream << "section: aliases" << Qt::endl;
|
outStream << "section: aliases" << endl;
|
||||||
|
|
||||||
for (const Screen& s : config.screens()) {
|
for (const Screen& s : config.screens()) {
|
||||||
if (!s.isNull())
|
if (!s.isNull())
|
||||||
s.writeAliasesSection(outStream);
|
s.writeAliasesSection(outStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
outStream << "end" << Qt::endl << Qt::endl;
|
outStream << "end" << endl << endl;
|
||||||
|
|
||||||
outStream << "section: links" << Qt::endl;
|
outStream << "section: links" << endl;
|
||||||
|
|
||||||
for (int i = 0; i < config.screens().size(); i++)
|
for (int i = 0; i < config.screens().size(); i++)
|
||||||
if (!config.screens()[i].isNull())
|
if (!config.screens()[i].isNull())
|
||||||
{
|
{
|
||||||
outStream << "\t" << config.screens()[i].name() << ":" << Qt::endl;
|
outStream << "\t" << config.screens()[i].name() << ":" << endl;
|
||||||
|
|
||||||
for (unsigned int j = 0; j < sizeof(neighbourDirs) / sizeof(neighbourDirs[0]); j++)
|
for (unsigned int j = 0; j < sizeof(neighbourDirs) / sizeof(neighbourDirs[0]); j++)
|
||||||
{
|
{
|
||||||
int idx = config.adjacentScreenIndex(i, neighbourDirs[j].x, neighbourDirs[j].y);
|
int idx = config.adjacentScreenIndex(i, neighbourDirs[j].x, neighbourDirs[j].y);
|
||||||
if (idx != -1 && !config.screens()[idx].isNull())
|
if (idx != -1 && !config.screens()[idx].isNull())
|
||||||
outStream << "\t\t" << neighbourDirs[j].name << " = " << config.screens()[idx].name() << Qt::endl;
|
outStream << "\t\t" << neighbourDirs[j].name << " = " << config.screens()[idx].name() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
outStream << "end" << Qt::endl << Qt::endl;
|
outStream << "end" << endl << endl;
|
||||||
|
|
||||||
outStream << "section: options" << Qt::endl;
|
outStream << "section: options" << endl;
|
||||||
|
|
||||||
if (config.hasHeartbeat())
|
if (config.hasHeartbeat())
|
||||||
outStream << "\t" << "heartbeat = " << config.heartbeat() << Qt::endl;
|
outStream << "\t" << "heartbeat = " << config.heartbeat() << endl;
|
||||||
|
|
||||||
outStream << "\t" << "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << Qt::endl;
|
outStream << "\t" << "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << endl;
|
||||||
outStream << "\t" << "screenSaverSync = " << (config.screenSaverSync() ? "true" : "false") << Qt::endl;
|
outStream << "\t" << "screenSaverSync = " << (config.screenSaverSync() ? "true" : "false") << endl;
|
||||||
outStream << "\t" << "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << Qt::endl;
|
outStream << "\t" << "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << endl;
|
||||||
outStream << "\t" << "clipboardSharing = " << (config.clipboardSharing() ? "true" : "false") << Qt::endl;
|
outStream << "\t" << "clipboardSharing = " << (config.clipboardSharing() ? "true" : "false") << endl;
|
||||||
|
|
||||||
if (config.hasSwitchDelay())
|
if (config.hasSwitchDelay())
|
||||||
outStream << "\t" << "switchDelay = " << config.switchDelay() << Qt::endl;
|
outStream << "\t" << "switchDelay = " << config.switchDelay() << endl;
|
||||||
|
|
||||||
if (config.hasSwitchDoubleTap())
|
if (config.hasSwitchDoubleTap())
|
||||||
outStream << "\t" << "switchDoubleTap = " << config.switchDoubleTap() << Qt::endl;
|
outStream << "\t" << "switchDoubleTap = " << config.switchDoubleTap() << endl;
|
||||||
|
|
||||||
outStream << "\t" << "switchCorners = none ";
|
outStream << "\t" << "switchCorners = none ";
|
||||||
for (int i = 0; i < config.switchCorners().size(); i++) {
|
for (int i = 0; i < config.switchCorners().size(); i++) {
|
||||||
|
@ -268,15 +268,15 @@ QTextStream& operator<<(QTextStream& outStream, const ServerConfig& config)
|
||||||
outStream << "+" << config.switchCornerName(corner) << " ";
|
outStream << "+" << config.switchCornerName(corner) << " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outStream << Qt::endl;
|
outStream << endl;
|
||||||
|
|
||||||
outStream << "\t" << "switchCornerSize = " << config.switchCornerSize() << Qt::endl;
|
outStream << "\t" << "switchCornerSize = " << config.switchCornerSize() << endl;
|
||||||
|
|
||||||
for (const Hotkey& hotkey : config.hotkeys()) {
|
for (const Hotkey& hotkey : config.hotkeys()) {
|
||||||
outStream << hotkey;
|
outStream << hotkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
outStream << "end" << Qt::endl << Qt::endl;
|
outStream << "end" << endl << endl;
|
||||||
|
|
||||||
return outStream;
|
return outStream;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue