[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Dragonplayer krazy2 fixes
From:       Paul B <happysmileman () googlemail ! com>
Date:       2009-01-16 17:32:06
Message-ID: 200901161732.07048.happysmileman () gmail ! com
[Download RAW message or body]

Just created a patch to fix (most) krazy2 issues in dragonplayer for 
"Kourse 3" on forum.kde.org.

There's a few issues not fixed by it:

Check for cpp macros and usage [cpp]... 1 issue found:
debug.h line 44 contains platform specific macro, this should be done 
using cmake instead, I don't know how I would fix this.

Check for an acceptable license [license]... 2 issues found:
app/recentlyPlayedList.cpp and app/recentlyPlayedList.h missing 
license.
It's not my own work, AFAIK the actual author would have to do this 
(just a formality I guess)

Check for Qt classes that should not be used [qclasses]... 2 issues 
found:
app/playDialog.h/.cpp use a QDialog instead of a KDialog, I've tried 
changing this and got some weird graphical errors, seems it'd require 
a bit more changes than the other issues, I'll look at it again and if 
I do get it to work I'll send in another patch, but no luck so far 
(don't have much experience)

Also in app/theStream.cpp there's the following code:
>const QString artist;
>const QString title;

>if (hasVideo() && !title.isEmpty())
>    return title;
>else if (!title.isEmpty() && !artist.isEmpty())
>    return artist + " - " + title;
Clearly that doesn't do anything, it's probably just a kind of 
placeholder for something not implemented yet and should be marked as 
such or removed.

["patch.diff" (text/x-patch)]

Index: app/mainWindow.cpp
===================================================================
--- app/mainWindow.cpp	(revision 910592)
+++ app/mainWindow.cpp	(working copy)
@@ -220,7 +220,7 @@
         if (args.isSet( "play-dvd" ))
             engine()->playDvd();
         else if (args.count() > 0 ) {
-            open( args.url( 0 ) );
+            this->open( args.url( 0 ) );
             args.clear();
             adjustSize(); //will resize us to reflect the videoWindow's sizeHint()
         }
@@ -272,7 +272,7 @@
     connect( playerStop, SIGNAL( triggered() ), engine(), SLOT( stop() ) );
     addToAc( playerStop )
 
-    KToggleAction* mute = new KToggleAction( KIcon("player-volume-muted"), \
i18n("Mute"), ac ); +    KToggleAction* mute = new KToggleAction( \
KIcon("player-volume-muted"), i18nc( "Mute the sound output", "Mute"), ac );  \
mute->setObjectName( "mute" );  mute->setShortcut( Qt::Key_M );
     connect( mute, SIGNAL( toggled( bool ) ), videoWindow(), SLOT( mute( bool ) ) );
@@ -394,7 +394,7 @@
         m_volumeSlider->setDisabled ( engine()->isMuted() );
 
         m_muteCheckBox = new QCheckBox();
-        m_muteCheckBox->setText( i18n( "Mute " ) );
+        m_muteCheckBox->setText( i18nc( "Mute the sound output", "Mute " ) );
         m_muteCheckBox->setChecked ( engine()->isMuted() );
         connect( m_muteCheckBox, SIGNAL( toggled( bool ) ), videoWindow(), SLOT( \
mute( bool ) ) );  
@@ -550,17 +550,17 @@
         const KUrl url = KFileDialog::getOpenUrl( \
KUrl("kfiledialog:///dragonplayer"),mimeFilter.join(" "), this, i18n("Select A File \
To Play") );  if( url.isEmpty() )
         {
-             debug() << "returning, blah";
+             debug() << "URL empty in MainWindow::playDialogResult()";
             return;
         }
         else
-            open( url );
+            this->open( url );
         } break;
     case PlayDialog::RECENT_FILE:
        
         break;
     case PlayDialog::VCD:
-        open( KUrl( "vcd://" ) ); // one / is not enough
+        this->open( KUrl( "vcd://" ) ); // one / is not enough
         break;
     case PlayDialog::DVD:
         playDisc();
@@ -611,7 +611,7 @@
 {
     m_playDialog->deleteLater();
     m_playDialog = 0;
-    open( url );
+    this->open( url );
 }
 
 void
@@ -702,7 +702,7 @@
 {
     KUrl::List uriList = KUrl::List::fromMimeData( e->mimeData() );
     if( !uriList.isEmpty() )
-        open( uriList.first() );
+        this->open( uriList.first() );
     else
         engineMessage( i18n("Sorry, no media was found in the drop") );
 }
Index: app/theStream.cpp
===================================================================
--- app/theStream.cpp	(revision 910592)
+++ app/theStream.cpp	(working copy)
@@ -138,8 +138,8 @@
     TheStream::prettyTitle()
     {
         const KUrl& url      = videoWindow()->m_media->currentSource().url();
-        const QString artist = QString();
-        const QString title  = QString();
+        const QString artist;
+        const QString title;
 
         if (hasVideo() && !title.isEmpty())
             return title;
Index: app/actions.cpp
===================================================================
--- app/actions.cpp	(revision 910592)
+++ app/actions.cpp	(working copy)
@@ -67,7 +67,7 @@
 ///Codeine::VolumeAction
 ////////////////////////////////////////////////////
 Codeine::VolumeAction::VolumeAction( QObject *receiver, const char *slot, \
                KActionCollection *ac )
-        : KToggleAction( i18n("Volume"), ac )
+        : KToggleAction( i18nc( "Volume of sound output", "Volume"), ac )
 {
     setObjectName( "volume" );
     setIcon( KIcon( "player-volume" ) );
Index: app/playlistFile.cpp
===================================================================
--- app/playlistFile.cpp	(revision 910592)
+++ app/playlistFile.cpp	(working copy)
@@ -41,9 +41,9 @@
 
     QString &path = m_path = url.path();
 
-    if( path.endsWith( ".pls", Qt::CaseInsensitive ) )
+    if( path.endsWith( QString(".pls"), Qt::CaseInsensitive ) )
         m_type = PLS; else
-    if( path.endsWith( ".m3u", Qt::CaseInsensitive ) )
+    if( path.endsWith( QString(".m3u"), Qt::CaseInsensitive ) )
         m_type = M3U;
     else {
         m_type = Unknown;
@@ -52,7 +52,7 @@
     }
 
     if( m_isRemoteFile ) {
-        path = QString();
+        path.clear();
         if( !KIO::NetAccess::download( url, path, Codeine::mainWindow() ) ) {
             m_error = i18n( "Dragon Player could not download the remote playlist: \
%1", url.prettyUrl() );  return;
@@ -91,7 +91,7 @@
 
     for( QString line = stream.readLine(); !line.isNull(); )
     {
-        if( line.startsWith( "File" ) ) {
+        if( line.startsWith( QString("File") ) ) {
             const KUrl url = line.section( '=', -1 );
             const QString title = stream.readLine().section( '=', -1 );
 
@@ -116,7 +116,7 @@
     {
         line = stream.readLine();
 
-        if( line.startsWith( "#EXTINF", Qt::CaseInsensitive ) )
+        if( line.startsWith( QString("#EXTINF"), Qt::CaseInsensitive ) )
             continue;
 
         else if( !line.startsWith( '#' ) && !line.isEmpty() )
Index: app/fht.cpp
===================================================================
--- app/fht.cpp	(revision 910592)
+++ app/fht.cpp	(working copy)
@@ -122,7 +122,7 @@
 	}
 	semiLogSpectrum(p);
 	*out++ = *p = *p / 100;
-	for (k = i = 1, r = m_log; i < n; i++) {
+	for (k = i = 1, r = m_log; i < n; ++i) {
 		j = *r++;
 		if (i == j)
 			*out++ = p[i];
Index: app/stateChange.cpp
===================================================================
--- app/stateChange.cpp	(revision 910592)
+++ app/stateChange.cpp	(working copy)
@@ -143,7 +143,7 @@
         const QString url_string = url.url();
         if( !(url_string.contains( "porn", Qt::CaseInsensitive ) || \
url_string.contains( "pr0n", Qt::CaseInsensitive )) )  #endif
-            if( url.protocol() != "dvd" && url.protocol() != "vcd" && \
url.prettyUrl()!="") { +            if( url.protocol() != "dvd" && url.protocol() != \
                "vcd" && !url.prettyUrl().isEmpty()) {
                 KConfigGroup config = KConfigGroup( KGlobal::config(), "General" );
                 const QString prettyUrl = url.prettyUrl();
 



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic