Author: coolo Date: Wed Dec 12 07:51:36 2007 New Revision: 43004 URL: http://svn.opensuse.org/viewcvs/yast?rev=43004&view=rev Log: a couple of compile warnings removed Modified: trunk/qt4/src/pkg/YQPkgDescriptionView.cc trunk/qt4/src/pkg/YQPkgDescriptionView.h Modified: trunk/qt4/src/pkg/YQPkgDescriptionView.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt4/src/pkg/YQPkgDescriptionView.cc?rev=43004&r1=43003&r2=43004&view=diff ============================================================================== --- trunk/qt4/src/pkg/YQPkgDescriptionView.cc (original) +++ trunk/qt4/src/pkg/YQPkgDescriptionView.cc Wed Dec 12 07:51:36 2007 @@ -114,26 +114,24 @@ void -YQPkgDescriptionView::showLink( const QString & url ) +YQPkgDescriptionView::showLink( const QUrl & url ) { - if ( url.startsWith( "pkg:" ) ) + if ( url.scheme() == "pkg" ) { - QString pkgName = url; - pkgName.remove( QRegExp( "^pkg:/*" ) ); // Remove leading protocol and slashes - pkgName.remove( QRegExp( "/*$" ) ); // Remove trailing slashes + QString pkgName = url.authority(); y2milestone( "Hyperlinking to package '%s'", qPrintable(pkgName) ); YQPkgDescriptionDialog::showDescriptionDialog( pkgName ); } else { y2error( "Protocol not supported - can't follow hyperlink '%s'", - qPrintable(url) ); + qPrintable(url.toString()) ); } } void -YQPkgDescriptionView::setSource( const QString & url ) +YQPkgDescriptionView::setSource( const QUrl & url ) { showLink( url ); } Modified: trunk/qt4/src/pkg/YQPkgDescriptionView.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt4/src/pkg/YQPkgDescriptionView.h?rev=43004&r1=43003&r2=43004&view=diff ============================================================================== --- trunk/qt4/src/pkg/YQPkgDescriptionView.h (original) +++ trunk/qt4/src/pkg/YQPkgDescriptionView.h Wed Dec 12 07:51:36 2007 @@ -20,6 +20,7 @@ #ifndef YQPkgDescriptionView_h #define YQPkgDescriptionView_h +#include <QUrl> #include "YQPkgGenericDetailsView.h" @@ -56,7 +57,7 @@ * Reimplemented from QTextBrowser to avoid having an empty text each time * the user clicks on a hyperlink. **/ - virtual void setSource( const QString & name ); + virtual void setSource( const QUrl & name ); protected: @@ -69,7 +70,7 @@ * Show information for a hyperlinked object, * e.g., a "pkg:somepkg" link to another package. **/ - void showLink( const QString & url ); + void showLink( const QUrl & url ); }; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org