Commit 0954cdf9 authored by David Faure's avatar David Faure
Browse files

Backport: Fix for bug found by ereslibre: when detaching a tab the new window...

Backport: Fix for bug found by ereslibre: when detaching a tab the new window was not loading the profile.

svn path=/branches/KDE/4.1/kdebase/apps/; revision=853134
parent 932ac948
......@@ -296,8 +296,8 @@ void KonqViewManager::breakOffTab( KonqFrameBase* currentFrame, const QSize& win
KTemporaryFile tempFile;
tempFile.open();
KConfig config( tempFile.fileName() );
KConfigGroup profileGroup( &config, "Profile" );
KSharedConfigPtr config = KSharedConfig::openConfig( tempFile.fileName() );
KConfigGroup profileGroup( config, "Profile" );
QString prefix = QString::fromLatin1( currentFrame->frameType() ) + QString::number(0);
profileGroup.writeEntry( "RootItem", prefix );
......@@ -307,7 +307,7 @@ void KonqViewManager::breakOffTab( KonqFrameBase* currentFrame, const QSize& win
KonqMainWindow *mainWindow = new KonqMainWindow(KUrl(), m_pMainWindow->xmlFile());
mainWindow->viewManager()->loadViewProfileFromGroup( profileGroup, QString() );
mainWindow->viewManager()->loadViewProfileFromConfig( config, QString(), currentProfile() );
KonqFrameTabs * kft = mainWindow->viewManager()->tabContainer();
KonqFrameBase *newFrame = dynamic_cast<KonqFrameBase*>(kft->currentWidget());
......@@ -413,7 +413,7 @@ void KonqViewManager::reloadAllTabs( )
void KonqViewManager::removeOtherTabs( KonqFrameBase* currentFrame )
{
Q_ASSERT(currentFrame);
// currentFrame might be a frame contained inside a splitted frame so what we'll
// do here is just compare if the frames are inside the same tab.
currentFrame = m_tabContainer->tabContaining(currentFrame);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment