[Marble-commits] branches/KDE/4.4/kdeedu/marble/src
Torsten Rahn
tackat at kde.org
Sat Jan 9 21:43:57 CET 2010
SVN commit 1072281 by rahn:
- Proxy fix (still needs some more cleanup in trunk).
- Removal of the Edit toolbar entry.
- Moval of the Refresh menu entry a bit higher within the
View Menu for consistency reasons.
M +0 -4 QtMainWindow.cpp
M +10 -11 lib/MarbleWidget.cpp
M +6 -1 lib/QtMarbleConfigDialog.cpp
M +6 -1 marble_part.cpp
M +4 -4 marble_part.rc
--- branches/KDE/4.4/kdeedu/marble/src/QtMainWindow.cpp #1072280:1072281
@@ -776,10 +776,6 @@
m_controlView->marbleWidget()->setPersistentTileCacheLimit( m_configDialog->persistentTileCacheLimit() * 1024 );
m_controlView->marbleWidget()->setVolatileTileCacheLimit( m_configDialog->volatileTileCacheLimit() * 1024 );
- /*
- m_controlView->marbleWidget()->setProxy( m_configDialog->proxyUrl(), m_configDialog->proxyPort(), m_configDialog->user(), m_configDialog->password() );
- */
-
m_controlView->marbleWidget()->updateChangedMap();
}
--- branches/KDE/4.4/kdeedu/marble/src/lib/MarbleWidget.cpp #1072280:1072281
@@ -1313,40 +1313,39 @@
void MarbleWidget::setProxy( const QString& proxyHost, const quint16 proxyPort, const QString& user, const QString& password )
{
- d->m_proxyHost = proxyHost;
- d->m_proxyPort = proxyPort;
- d->m_user = user;
- d->m_password = password;
-
QNetworkProxy::ProxyType type = QNetworkProxy::HttpProxy;
// Make sure that no proxy is used for an empty string or the default value:
if ( proxyHost.isEmpty() || proxyHost == "http://" )
type = QNetworkProxy::NoProxy;
- QNetworkProxy proxy( type, d->m_proxyHost, d->m_proxyPort, d->m_user, d->m_password );
+ QString hostName = proxyHost;
+ if ( hostName.startsWith("http://" ) ) {
+ hostName = hostName.mid( QString( "http://" ).size() );
+ }
+
+ QNetworkProxy proxy( type, hostName, proxyPort, user, password );
QNetworkProxy::setApplicationProxy( proxy );
- mDebug() << "MarbleWidget::setProxy" << type << d->m_proxyHost << d->m_proxyPort << d->m_user << d->m_password;
}
QString MarbleWidget::proxyHost() const
{
- return d->m_proxyHost;
+ return QNetworkProxy::applicationProxy().hostName();
}
quint16 MarbleWidget::proxyPort() const
{
- return d->m_proxyPort;
+ return QNetworkProxy::applicationProxy().port();
}
QString MarbleWidget::user() const
{
- return d->m_user;
+ return QNetworkProxy::applicationProxy().user();
}
QString MarbleWidget::password() const
{
- return d->m_password;
+ return QNetworkProxy::applicationProxy().password();
}
QList<RenderPlugin *> MarbleWidget::renderPlugins() const
--- branches/KDE/4.4/kdeedu/marble/src/lib/QtMarbleConfigDialog.cpp #1072280:1072281
@@ -198,8 +198,13 @@
proxy.setType( QNetworkProxy::HttpProxy );
}
}
+
+ QString hostName = proxyUrl();
+ if ( hostName.startsWith("http://" ) ) {
+ hostName = hostName.mid( QString( "http://" ).size() );
+ }
- proxy.setHostName( proxyUrl() );
+ proxy.setHostName( hostName );
proxy.setPort( proxyPort() );
if ( proxyAuth() ) {
--- branches/KDE/4.4/kdeedu/marble/src/marble_part.cpp #1072280:1072281
@@ -1102,7 +1102,12 @@
}
}
- proxy.setHostName( MarbleSettings::proxyUrl() );
+ QString hostName = MarbleSettings::proxyUrl();
+ if ( hostName.startsWith("http://" ) ) {
+ hostName = hostName.mid( QString( "http://" ).size() );
+ }
+
+ proxy.setHostName( hostName );
proxy.setPort( MarbleSettings::proxyPort() );
if ( MarbleSettings::proxyAuth() ) {
--- branches/KDE/4.4/kdeedu/marble/src/marble_part.rc #1072280:1072281
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="marble_part" version="9">
+<kpartgui name="marble_part" version="12">
<MenuBar>
<Menu name="file" noMerge="1">
@@ -23,6 +23,7 @@
<Action name="show_currentlocation" group="show_merge"/>
<Separator/>
<Action name="show_crosshairs" group="show_merge"/>
+ <Action name="view_redisplay"/>
<Separator/>
<Menu name="infoboxes" noMerge="1">
<text>&Info Boxes</text>
@@ -39,7 +40,6 @@
<Action name="show_atmosphere"/>
<Separator/>
<Action name="control_sun"/>
- <Action name="view_redisplay"/>
</Menu>
<Menu name="settings" noMerge="1">
<text>&Settings</text>
@@ -60,10 +60,10 @@
<Separator/>
<Action name="edit_copy"/>
</ToolBar>
-
+<!--
<ToolBar position="Top" hidden="true" name="pluginToolBar">
<text>Edit Toolbar</text>
<ActionList name="plugins_actionlist" />
</ToolBar>
-
+-->
</kpartgui>
More information about the Marble-commits
mailing list