Skip to content

Commit

Permalink
Remove news feed tab from start page
Browse files Browse the repository at this point in the history
Fix #13497
Fix #13471
  • Loading branch information
m-kuhn committed Oct 3, 2015
1 parent 67082a9 commit 95c377a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 182 deletions.
149 changes: 0 additions & 149 deletions doc/whatsnew.html

This file was deleted.

31 changes: 1 addition & 30 deletions src/app/qgswelcomepage.cpp
Expand Up @@ -18,16 +18,14 @@
#include "qgisapp.h"
#include "qgsversioninfo.h"
#include "qgsapplication.h"
#include "qgsnetworkaccessmanager.h"

#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QListView>
#include <QSettings>
#include <QDesktopServices>

QgsWelcomePage::QgsWelcomePage( QWidget* parent )
: QTabWidget( parent )
: QWidget( parent )
{
QVBoxLayout* mainLayout = new QVBoxLayout;
mainLayout->setMargin( 0 );
Expand All @@ -52,28 +50,6 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )

addTab( recentProjctsContainer, "Recent Projects" );

QWidget* whatsNewContainer = new QWidget;
whatsNewContainer->setLayout( new QVBoxLayout );
QLabel* whatsNewTitle = new QLabel( QString( "<h1>%1</h1>" ).arg( tr( "QGIS News" ) ) );
whatsNewContainer->layout()->addWidget( whatsNewTitle );

QgsWebView *whatsNewPage = new QgsWebView();
whatsNewPage->page()->setNetworkAccessManager( QgsNetworkAccessManager::instance() );

whatsNewPage->setUrl( QUrl::fromLocalFile( QgsApplication::whatsNewFilePath() ) );
whatsNewPage->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
whatsNewPage->setContextMenuPolicy( Qt::NoContextMenu );
whatsNewPage->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
whatsNewPage->setStyleSheet( "background:transparent" );
whatsNewPage->setAttribute( Qt::WA_TranslucentBackground );

whatsNewContainer->layout()->addWidget( whatsNewPage );
// whatsNewContainer->setMaximumWidth( 250 );
// whatsNewContainer->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
addTab( whatsNewContainer, "News" );

connect( whatsNewPage, SIGNAL( linkClicked( QUrl ) ), this, SLOT( whatsNewLinkClicked( QUrl ) ) );

mVersionInformation = new QLabel;
mainLayout->addWidget( mVersionInformation );
mVersionInformation->setVisible( false );
Expand Down Expand Up @@ -117,8 +93,3 @@ void QgsWelcomePage::versionInfoReceived()
"}" );
}
}

void QgsWelcomePage::whatsNewLinkClicked( const QUrl& url )
{
QDesktopServices::openUrl( url );
}
4 changes: 1 addition & 3 deletions src/app/qgswelcomepage.h
Expand Up @@ -16,15 +16,14 @@
#ifndef QGSWELCOMEDIALOG_H
#define QGSWELCOMEDIALOG_H

#include <QTabWidget>
#include <QWidget>
#include <QLabel>

#include "qgswelcomepageitemsmodel.h"

class QgsVersionInfo;

class QgsWelcomePage : public QTabWidget
class QgsWelcomePage : public QWidget
{
Q_OBJECT

Expand All @@ -38,7 +37,6 @@ class QgsWelcomePage : public QTabWidget
private slots:
void itemActivated( const QModelIndex& index );
void versionInfoReceived();
void whatsNewLinkClicked( const QUrl& url );

private:
QgsWelcomePageItemsModel* mModel;
Expand Down

0 comments on commit 95c377a

Please sign in to comment.