while (KMainWindow::canBeRestored(n)) {
const QString className = KXmlGuiWindow::classNameOfToplevel(n);
if (className == QLatin1String("MainWindow")) {
while (KMainWindow::canBeRestored(n)) {
const QString className = KXmlGuiWindow::classNameOfToplevel(n);
if (className == QLatin1String("MainWindow")) {