[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.3/kdebase/apps/konqueror/src
From: David Faure <faure () kde ! org>
Date: 2009-08-17 17:59:01
Message-ID: 1250531941.189515.22832.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1012484 by dfaure:
Repair old profiles without tabs, so that they create a tabwidget. Otherwise it gets
created automatically, but without any view in it, and nothing works
(debug build: konq asserts, release build: konq just shows an empty unusable gray \
window).
With unit test. Fix will be in 4.3.1.
BUG: 201366
M +10 -0 konqviewmanager.cpp
A tests/filemanagement.old.profile \
trunk/KDE/kdebase/apps/konqueror/src/tests/filemanagement.old.profile#1012468 M +19 \
-0 tests/konqviewmgrtest.cpp M +1 -0 tests/konqviewmgrtest.h
--- branches/KDE/4.3/kdebase/apps/konqueror/src/konqviewmanager.cpp #1012483:1012484
@@ -903,6 +903,16 @@
KConfigGroup profileGroup(_cfg, "Profile");
+
+ // Repair profiles without tabs (#203166)
+ const QString rootItem = profileGroup.readEntry("RootItem", "empty");
+ const QString childrenKey = rootItem + "_Children";
+ if (profileGroup.readEntry(childrenKey, QStringList()) == (QStringList() << \
"View1" << "View2")) { + kDebug() << "Activating special \
tabwidget-insertion-hack"; + profileGroup.writeEntry(childrenKey, \
QStringList() << "View1" << "Tabs1"); + \
profileGroup.writeEntry("Tabs1_Children", "View2"); + }
+
loadViewProfileFromGroup(profileGroup, filename, forcedUrl, req, openUrl);
setCurrentProfile(filename);
--- branches/KDE/4.3/kdebase/apps/konqueror/src/tests/konqviewmgrtest.cpp \
#1012483:1012484 @@ -30,6 +30,7 @@
#include <konqsessionmanager.h>
#include <kstandarddirs.h>
#include <kconfiggroup.h>
+#include <kio/job.h>
#include <QLayout>
#include <khtml_part.h>
@@ -546,6 +547,24 @@
QVERIFY(sizes[0] < sizes[1]);
}
+void ViewMgrTest::testLoadOldProfile()
+{
+ KonqMainWindow mainWindow;
+
+ const QString profileSrc = KDESRCDIR "/filemanagement.old.profile";
+ const QString profile = profileSrc + ".copy";
+ // KonqViewManager fixes up the old profile, so let's make a copy of it first.
+ KIO::FileCopyJob* job = KIO::file_copy(profileSrc, profile, -1, KIO::Overwrite);
+ QVERIFY(job->exec());
+ const QString path = QDir::homePath();
+ mainWindow.viewManager()->loadViewProfileFromFile(profile, "filemanagement", \
KUrl(path)); + QCOMPARE( DebugFrameVisitor::inspect(&mainWindow), \
QString("MC(FT[F]).") ); // mainWindow, splitter, frame, tab widget, one frame + \
QCOMPARE(mainWindow.locationBarURL(), path); + \
QCOMPARE(mainWindow.currentView()->locationBarURL(), path); + \
QFile::remove(profile); +}
+
+
void ViewMgrTest::testDuplicateWindow()
{
KonqMainWindow mainWindow;
--- branches/KDE/4.3/kdebase/apps/konqueror/src/tests/konqviewmgrtest.h \
#1012483:1012484 @@ -48,6 +48,7 @@
void testDuplicateSplittedTab();
void testDeletePartInTab();
void testLoadProfile();
+ void testLoadOldProfile();
void testDuplicateWindow();
void testDuplicateWindowWithSidebar();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic