Welcome to the KDE Community Forums, the official forum board for KDE.
You are currently viewing the forums as an unregistered user. Registration allows you to post and discuss topics, receive private messages, vote on ideas, subscribe to topics and many such great features. Registration is a simple process and completely free. So register now and be a part of the community!

Discuss Kourse 3

Administrator User avatar

bcooksley

Administrator

Posts: 5439

Karma: 23

Gender:  Male

OS: openSUSE openSUSE

New Zealand

Discuss Kourse 3

Post Mon Jan 12, 2009 9:02 am

Here you can discuss Kourse 3 apart from the Main action
System Settings and Device Actions KCM maintainer
Image

Alumni

Pconfig

Alumni

Posts: 54

Karma: 0

Gender:  Male

OS: Kubuntu Kubuntu

Belgium

RE: Discuss Kourse 3

Post Mon Jan 12, 2009 5:50 pm

Although I'm not an official student, i just got krazy2 working. What do we do with things like:
All source files must contain a copyright header which must contain and email-address. Some people put a (at) or # instead of @ (to avoid scrapers i guess but yea, those scrapers got smarter as well :P)

Those issues aren't that important but for some reason in find that they need to get fixed. Or by changing those addresses to @'s or by poking the creator of krazy that he needs to do something about it :P

Mentor User avatar

msoeken

Mentor

Posts: 301

Karma: 4

Gender:  Male

OS: Kubuntu Kubuntu

Germany

RE: Discuss Kourse 3

Post Mon Jan 12, 2009 6:16 pm

Pconfig wrote:All source files must contain a copyright header which must contain and email-address. Some people put a (at) or # instead of @ (to avoid scrapers i guess but yea, those scrapers got smarter as well :P)

Those issues aren't that important but for some reason in find that they need to get fixed. Or by changing those addresses to @'s or by poking the creator of krazy that he needs to do something about it :P


That is an interesting point. I think that some masked email adresses should also be detected as good by the krazy2 plugin, e.g. # or " at " ... " dot ". They should then also mentioned in the Info Box on ebn.org. How are your Perl skills? Could you modify the plugin so that those # addresses are detected.

Cheers, m
Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]

Alumni

Pconfig

Alumni

Posts: 54

Karma: 0

Gender:  Male

OS: Kubuntu Kubuntu

Belgium

RE: Discuss Kourse 3

Post Mon Jan 12, 2009 6:26 pm

msoeken wrote:
Pconfig wrote:All source files must contain a copyright header which must contain and email-address. Some people put a (at) or # instead of @ (to avoid scrapers i guess but yea, those scrapers got smarter as well :P)

Those issues aren't that important but for some reason in find that they need to get fixed. Or by changing those addresses to @'s or by poking the creator of krazy that he needs to do something about it :P


That is an interesting point. I think that some masked email adresses should also be detected as good by the krazy2 plugin, e.g. # or " at " ... " dot ". They should then also mentioned in the Info Box on ebn.org. How are your Perl skills? Could you modify the plugin so that those # addresses are detected.

Cheers, m


I've talked to winterz about it. He said to put it in a bugreport so he wouldn't forget about it. Well, working on fixing it myself now. Didn't do any perl before though. I'll let you know how it works out.[hr]
Fixed it.. If you can come up with more 'obscure' email-address forms, let me know.

Currently taking
bla @ bla
bla@bla
bla#bla
bla # bla
bla(at)bla
bla (at) bla
bla at bla

Code: Select all
Index: copyright
===================================================================
--- copyright   (revision 910059)
+++ copyright   (working copy)
@@ -135,11 +135,11 @@
#    next;
#  }

-  if ($line !~ m/copyright[[:space:]].+(@| at | @ )[[:alnum:]]/i ) {
+   if ($line !~ m/copyright[[:space:]].+(@| at |(at)| (at) |#| # | @ )[[:alnum:]]/i ) {
     #Always check the next line in case the email address is there.
     $line = ;
     $lcnt++;
-    if ($line !~ m/[[:print:]]+(@| at | @ )[[:alnum:]]/i ||
+    if ($line !~ m/[[:print:]]+(@| at |(at)| (at) |#| # | @ )[[:alnum:]]/i ||
       $line =~ m/copyright/i) {

       #This line didn't yield anything useful, so we need to check it again.


Now where do i submit this patch?

Edit: submitted https://bugs.kde.org/show_bug.cgi?id=180496
Last edited by msoeken on Tue Jan 13, 2009 6:59 am, edited 1 time in total.

Alumni

Pconfig

Alumni

Posts: 54

Karma: 0

Gender:  Male

OS: Kubuntu Kubuntu

Belgium

RE: Discuss Kourse 3

Post Mon Jan 12, 2009 10:05 pm

Btw, i know i'm not taking part of this course but it dragged my attention and since i had some free time tonight a decided to look at a simple app with few krazy issues.
This is what i came up with for kmag

Code: Select all
Index: kmag.cpp
===================================================================
--- kmag.cpp   (revision 910110)
+++ kmag.cpp   (working copy)
@@ -91,7 +91,7 @@
   fpsArray.push_back(15); // high
   fpsArray.push_back(25); // very high

-  colorArrayString setWhatsThis(i18n("Select the refresh rate. The higher the rate, the more computing power (CPU) will be needed."));
   m_pFPSBox->setToolTip(i18n("Refresh rate"));

-  m_pColorBox = new KSelectAction(i18n("&Color"),this);
+  m_pColorBox = new KSelectAction(i18nc("Color of the view", "&Color"),this);
   actionCollection()->addAction("color_mode", m_pColorBox);
   m_pColorBox->setItems(colorArrayString);
   m_pColorBox->setWhatsThis(i18n("Select a mode to simulate various types of color-blindness."));
@@ -664,7 +664,7 @@
     refreshSwitch->setToolTip(i18n("Click to stop window update"));
   } else {
     refreshSwitch->setIcon(KIcon("reload.png"));
-    refreshSwitch->setText(i18n("Start"));
+    refreshSwitch->setText(i18nc("Start updating the window", "Start"));
     refreshSwitch->setToolTip(i18n("Click to start window update"));
   }
}
Index: kmagzoomview.h
===================================================================
--- kmagzoomview.h   (revision 910110)
+++ kmagzoomview.h   (working copy)
@@ -14,12 +14,13 @@
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; version 2 of the License        *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/

-#ifndef KMagZoomView_h_
-#define KMagZoomView_h_
+#ifndef KMagZoomView_h
+#define KMagZoomView_h

// include files for Qt
#include
@@ -241,4 +242,4 @@
     bool m_fitToWindow;
};

-#endif // KMagZoomView_h_
+#endif // KMagZoomView_h


When applying this diff together with the email patch kmag should be krazyfied ;)
Last edited by msoeken on Tue Jan 13, 2009 6:58 am, edited 1 time in total.

Mentor User avatar

msoeken

Mentor

Posts: 301

Karma: 4

Gender:  Male

OS: Kubuntu Kubuntu

Germany

RE: Discuss Kourse 3

Post Tue Jan 13, 2009 6:55 am

Pconfig wrote:Now where do i submit this patch?

Edit: submitted https://bugs.kde.org/show_bug.cgi?id=180496


Great. First contribution from this kourse. Hope it will find its way to krazy because I think it is a good point also to allow masked email addresses.[hr]
Pconfig wrote:Btw, i know i'm not taking part of this course but it dragged my attention and since i had some free time tonight a decided to look at a simple app with few krazy issues.
This is what i came up with for kmag

When applying this diff together with the email patch kmag should be krazyfied ;)


Great job. Could you send this patch to the kde-accessibility mailing list or ask in an appropriate irc channel to commit it?

I can add you to the students group even if you do not have so much time.
Last edited by msoeken on Tue Jan 13, 2009 6:58 am, edited 1 time in total.
Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]

Alumni

Pconfig

Alumni

Posts: 54

Karma: 0

Gender:  Male

OS: Kubuntu Kubuntu

Belgium

RE: Discuss Kourse 3

Post Tue Jan 13, 2009 11:14 am

msoeken wrote:I can add you to the students group even if you do not have so much time.


Sure, i'll make some more patches ;)

Mentor User avatar

msoeken

Mentor

Posts: 301

Karma: 4

Gender:  Male

OS: Kubuntu Kubuntu

Germany

RE: Discuss Kourse 3

Post Tue Jan 13, 2009 11:36 am

Pconfig, you are now in the Active Students group. Feel free to join us in the Kourse 3 thread.
Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]

Alumni

HappySmileMan

Alumni

Posts: 18

Karma: 0

Gender:  Male

OS: Kubuntu Kubuntu

Ireland

RE: Discuss Kourse 3

Post Tue Jan 13, 2009 10:00 pm

Taking a look at dragonplayer.

So far I've found some things which I'm really not sure how to fix.

First is
Code: Select all
4. Check for cpp macros and usage [cpp]... 1 issue found
        ./src/debug.h: O/S or Compiler specific macro line#44[_WIN32] (1)
        C++ source files and non-installed headers should NOT use cpp   
        conditionals that check for a certain O/S or compiler; instead use
        CMake HAVE_foo macros. We want to check for features discovered   
        during CMake time rather than for a specific O/S.

I can understand why this is a problem, but I really have no idea what the line mentioned means other than vague guesses after googling, and even less of an idea what to do.

Second is translations, that I should use context call, but looking at this page I don't see anything that would be suitable for "Volume" or "Mute". (For volume maybe "@item:inrange"?)

Also what do i do if I find code that really doesn't make any sense? I've found
Code: Select all
const QString artist = QString();
const QString title  = QString();

if (hasVideo() && !title.isEmpty())
    return title;
else if (!title.isEmpty() && !artist.isEmpty())
    return artist + " - " + title;

Which would seem to me that basically this is just a complete waste, since there's no way of the results of those statements to EVER be true, but I guess they might just be temporary, and in future that'll be added on to? For now I suppose I'll just change the first lines to "const QString artist;" to get rid of the Krazy problems, but I guess I should mention this when I send in patch?

Also I get "error: ‘::open’ has not been declared" when changing "open()" calls to "KDE_open()" (I've included )


Sorry for long reply, but better that i ask now than send it a terrible patch?
Last edited by HappySmileMan on Tue Jan 13, 2009 10:47 pm, edited 1 time in total.
HappySmileMan, proud to be a member of KDE forums since 2008-Oct.

Mentor User avatar

msoeken

Mentor

Posts: 301

Karma: 4

Gender:  Male

OS: Kubuntu Kubuntu

Germany

RE: Discuss Kourse 3

Post Wed Jan 14, 2009 10:30 am

HappySmileMan wrote:Taking a look at dragonplayer.

So far I've found some things which I'm really not sure how to fix.

First is
Code: Select all
4. Check for cpp macros and usage [cpp]... 1 issue found
        ./src/debug.h: O/S or Compiler specific macro line#44[_WIN32] (1)
        C++ source files and non-installed headers should NOT use cpp   
        conditionals that check for a certain O/S or compiler; instead use
        CMake HAVE_foo macros. We want to check for features discovered   
        during CMake time rather than for a specific O/S.

I can understand why this is a problem, but I really have no idea what the line mentioned means other than vague guesses after googling, and even less of an idea what to do.

I want to contact Allen for this issue today. I also have no idea how to fix them or where is the problem.
HappySmileMan wrote:Second is translations, that I should use context call, but looking at this page I don't see anything that would be suitable for "Volume" or "Mute". (For volume maybe "@item:inrange"?)

You can also use text for describing the context. For example Volume is "Volume of sound".
HappySmileMan wrote:Also what do i do if I find code that really doesn't make any sense? I've found
Code: Select all
const QString artist = QString();
const QString title  = QString();

if (hasVideo() && !title.isEmpty())
    return title;
else if (!title.isEmpty() && !artist.isEmpty())
    return artist + " - " + title;

Which would seem to me that basically this is just a complete waste, since there's no way of the results of those statements to EVER be true, but I guess they might just be temporary, and in future that'll be added on to? For now I suppose I'll just change the first lines to "const QString artist;" to get rid of the Krazy problems, but I guess I should mention this when I send in patch?

Yes, you should mention this. If in the future something has to be added to this code, there should go a TODO

HappySmileMan wrote:Also I get "error: ‘::open’ has not been declared" when changing "open()" calls to "KDE_open()" (I've included )

I will have a look at this to myself.
Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]

Next »

Who is online

Users browsing this forum: No registered users and 1 guest