[PC-BSD Commits] r20176 - pcbsd/current/src-qt4/pc-installgui
svn at pcbsd.org
svn at pcbsd.org
Mon Nov 12 07:59:51 PST 2012
Author: kris
Date: 2012-11-12 15:59:51 +0000 (Mon, 12 Nov 2012)
New Revision: 20176
Modified:
pcbsd/current/src-qt4/pc-installgui/backend.cpp
Log:
Fix a bug with some key layouts not being displayed in the GUI
Modified: pcbsd/current/src-qt4/pc-installgui/backend.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/backend.cpp 2012-11-12 15:37:41 UTC (rev 20175)
+++ pcbsd/current/src-qt4/pc-installgui/backend.cpp 2012-11-12 15:59:51 UTC (rev 20176)
@@ -152,6 +152,8 @@
code = line;
code.truncate(line.indexOf(" "));
desc = line.remove(0, line.indexOf(" "));
+ desc.replace("(", "'");
+ desc.replace(")", "'");
_layouts.append(desc.simplified() + " - (" + code.simplified() + ")");
}
}
@@ -167,11 +169,12 @@
if ( savedKeyVariants.empty() )
{
Process p(QStringList() << "xkeyboard-variants");
- if (p.waitForFinished()) {
- while (p.canReadLine()) {
- line = p.readLine();
- savedKeyVariants << line;
- }
+ while(p.state() == QProcess::Starting || p.state() == QProcess::Running)
+ QCoreApplication::processEvents();
+
+ while (p.canReadLine()) {
+ line = p.readLine().simplified();
+ savedKeyVariants << line;
}
}
More information about the Commits
mailing list