Re: KEditListWidget

2011-03-18 Thread Fabrice Ménard
Le jeudi 17 mars 2011 23:40:32 Christoph Feck a écrit :
 Do you need it in 4.6.2? I can apply to trunk, but I won't touch branches 
 until my git foo matures

Trunk is ok for me.
Thanks
-- 
Fabrice Ménard


How to know if I'm showing a tooltip?

2011-03-18 Thread John Tapsell
Hi all,

  When the user hovers over an item, it shows a tooltip.  I update
that tooltip once a second using the following code:

if(QToolTip::isVisible()) {
QWidget *w = d-mUi-treeView-viewport();
if(w-geometry().contains(d-mUi-treeView-mapFromGlobal(
QCursor::pos() ))) {
QHelpEvent event(QEvent::ToolTip, w-mapFromGlobal(
QCursor::pos() ), QCursor::pos());
qApp-notify(w, event);
}
}

This works, but the trouble is is that the tooltip could be visible
due to a dialog window.  So if I open a dialog box, then hover over an
item in that dialog box, it shows the correct tooltip for a moment,
then changes to the tooltip for the main window underneath, due to
that code I pasted above.

I've tried   window()-isActiveWindow()  which partially solves the
problem, but it's possible to have a dialog box on top, but have the
main window have the focus..

Any ideas?

JohnFlux


Dependencies Policy?

2011-03-18 Thread John Layt
Hi,

I was wondering if we need to define a New Dependencies policy, or at least 
some guidelines to remind people what to think about when choosing or creating 
new dependencies?

Something like:
* All new dependencies must be advised to the kde-build and kde-packager lists
* Any changes to KDE Development Platform dependencies (or to KDE Support 
projects that the dev platform depends on) to be discussed on k-c-d first
* Only depend on packages with a stable release
* Pick dependencies with api/abi guarantees or well managed .so versioning
* What's our attitude to inherited dependencies at both build and runtime, 
i.e. are libraries or services that use GConf/DConf/Glib/etc acceptable?
* Optional dependencies preferred, try ensure a sensible fallback if not 
available

Any other points?

John.


Re: How to know if I'm showing a tooltip?

2011-03-18 Thread John Tapsell
On 18 March 2011 11:24, John Tapsell johnf...@gmail.com wrote:
 I've tried   window()-isActiveWindow()  which partially solves the
 problem, but it's possible to have a dialog box on top, but have the
 main window have the focus..


I figured it out - I just need:

if (QToolTip::isVisible()  qApp-topLevelAt(QCursor::pos())
== window()) {

JohnFlux


Re: Dependencies Policy?

2011-03-18 Thread Rex Dieter
John Layt wrote:

 I was wondering if we need to define a New Dependencies policy, or at
 least some guidelines to remind people what to think about when choosing
 or creating new dependencies?

I would welcome a formal policy.

here's some references I found to related existing documents and policies 
include:
http://techbase.kde.org/Schedules/KDE4/4.7_Release_Schedule#Thursday.2C_May_12.2C_2011:_KDE_4.7_Dependency_Freeze
http://techbase.kde.org/Policies/Library_Code_Policy#External_Dependencies

-- Rex



KSambaShare destructor proposed patch

2011-03-18 Thread Fabrice Ménard
Hi,

As KSambaShare and KDirWatch are global statics we must ensure that an object 
has not already been destroyed before calling anything on it.

Regards,
-- 
Fabrice Ménarddiff --git a/kio/kio/ksambashare.cpp b/kio/kio/ksambashare.cpp
index e82f1b7..dfab22e 100644
--- a/kio/kio/ksambashare.cpp
+++ b/kio/kio/ksambashare.cpp
@@ -440,8 +440,10 @@ KSambaShare::KSambaShare()
 KSambaShare::~KSambaShare()
 {
 Q_D(const KSambaShare);
-if (KDirWatch::self()-contains(d-userSharePath)) {
+if (KDirWatch::exists()) {
+  if (KDirWatch::self()-contains(d-userSharePath)) {
 KDirWatch::self()-removeDir(d-userSharePath);
+  }
 }
 delete d_ptr;
 }


Git Workflow - Outstanding Issues

2011-03-18 Thread John Layt
Hi,

We still have some outstanding issues from the Git Workflow meeting a while 
back (see http://community.kde.org/20110213_GitWorkflowAgenda) which I'd like 
to see updated.

* Workflow
eean, steveire and PovAddict were to draw up alternative workflow proposals, 
steveire has drawn up one at 
http://community.kde.org/20110213_GitWorkflowAgenda/StevesIdea (see earlier 
thread).  Do we have the other proposals yet?  What needs doing to move this 
forward?

* Release branch naming, KDE/4.6 vs 4.6
This was decided by a coin toss to be 4.6 rather than KDE/4.6, but I suspect 
by now more people have stable branches from kdelibs/kdebase than the other 
modules so it may be less disruptive overall to use KDE/4.6?

Either way, there's still a couple of outstanding actions:
** Sysadmins to rename the branches that use the losing naming scheme if 
that's possible without too much disruption
** Sysadmins to block creating new branches for the losing naming scheme.

* Documentation
I've started the Git documentation:
  http://techbase.kde.org/Development/Git
  http://techbase.kde.org/Development/Git/Configuration
  http://techbase.kde.org/Development/Git/Recipes

I've also been revising the TechBase Getting Started pages, but that's a 
separate email.

* Commit Template
I've finally committed the Commit Template into kdelibs, any Git project that 
wants to use a different version can commit that to their own repo provided 
they follow the basic rules.

Cheers!

John.


Re: KSambaShare destructor proposed patch

2011-03-18 Thread David Faure
On Friday 18 March 2011, Fabrice Ménard wrote:
 Hi,
 
 As KSambaShare and KDirWatch are global statics we must ensure that an
 object has not already been destroyed before calling anything on it.

Looks good, please commit -- if you don't have a kde svn/git account yet, 
please get one, your patches are good ;)

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).


Re: Review Request: Fix handling of FTP urls whose path name ends with a type code

2011-03-18 Thread David Faure
On Wednesday 16 March 2011, Thiago Macieira wrote:
 Suggestion: 
 path.left(path.length() - sizeof ;type=);

Unreadable.

 sizeof(;type=) == strlen(;type=X)

A hidden off-by-one, how nice to have in our code ;)

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).


Re: Review Request: Patch for FTP ioslave unnecessarily asks for password

2011-03-18 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100873/#review2040
---


Hmm, this whole block is inside if (failedAuth0), so this means kio_ftp 
tried to log in, but without using the cached credentials?
Ah, probably because it tries anonymous first. Which kind of sucks on sites 
where you have recorded a password into kwallet...

So I'm not objecting this patch, feel free to commit, but I actually think a 
better fix would be if cached credentials, then use them for the first 
attempt (like kio_sftp does, I think). And then the code you touched (handling 
of failed auth) doesn't have to change.

- David


On March 17, 2011, 2:44 p.m., Dawit Alemayehu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/100873/
 ---
 
 (Updated March 17, 2011, 2:44 p.m.)
 
 
 Review request for kdelibs.
 
 
 Summary
 ---
 
 The attached patch forces kio_ftp to first look up for cached password before 
 showing the user a prompt to enter password information. This addresses the 
 issue mentioned in 143488 and makes kio_ftp's behavior consistent with the 
 other ioslaves.
 
 
 This addresses bugs 124675 and 143488.
 http://bugs.kde.org/show_bug.cgi?id=124675
 http://bugs.kde.org/show_bug.cgi?id=143488
 
 
 Diffs
 -
 
   kioslave/ftp/ftp.cpp 038ac2e 
 
 Diff: http://git.reviewboard.kde.org/r/100873/diff
 
 
 Testing
 ---
 
 Login to an ftp site, save the password and visit the same site again. No 
 prompt.
 
 
 Thanks,
 
 Dawit
 




Re: Git Workflow - Outstanding Issues

2011-03-18 Thread Wolfgang Rohdewald
On Freitag 18 März 2011, John Layt wrote:
 * Commit Template
 I've finally committed the Commit Template into kdelibs, any
 Git project that  wants to use a different version can commit
 that to their own repo provided they follow the basic rules.

would it be feasible to add a section like

# --[ Notify packagers about changed dependencies ]---|
#DEPS:


-- 
Wolfgang


Re: Git Workflow - Outstanding Issues

2011-03-18 Thread Parker Coates
On Fri, Mar 18, 2011 at 23:25, Wolfgang Rohdewald wrote:
 On Freitag 18 März 2011, John Layt wrote:
 * Commit Template
 I've finally committed the Commit Template into kdelibs, any
 Git project that  wants to use a different version can commit
 that to their own repo provided they follow the basic rules.

 would it be feasible to add a section like

 # --[ Notify packagers about changed dependencies ]---|
 #DEPS:

Ideally, something as significant as changed dependencies should be
discussed *before* the code is committed, no?

Parker


Re: Git Workflow - Outstanding Issues

2011-03-18 Thread Wolfgang Rohdewald
On Samstag 19 März 2011, Parker Coates wrote:
 On Fri, Mar 18, 2011 at 23:25, Wolfgang Rohdewald wrote:
  On Freitag 18 März 2011, John Layt wrote:
  * Commit Template
  I've finally committed the Commit Template into kdelibs,
  any Git project that  wants to use a different version can
  commit that to their own repo provided they follow the
  basic rules.
  
  would it be feasible to add a section like
  
  # --[ Notify packagers about changed dependencies
  ]---|
 
  #DEPS:
 Ideally, something as significant as changed dependencies
 should be discussed *before* the code is committed, no?
 
 Parker

of course you are right in a stable branch of kdelibs, but
in master, in smaller repos which might only have one or
very few developers?

For kajongg in KDE 4.6 some packagers did actually miss
dependency changes, but I did not even know I should have
actively notified them, I expected they would use some 
commit filters watching CMakeLists.txt. A reminder in
the commit template seems like a good place to me for
guiding the developers.

so maybe not in kdelibs, but it might be useful in smaller
repos like kajongg (assuming and hoping kdegames will be
split into one repo per game) together with the server commit
hook sending those mails to kde-build and kde-packager

but then it should still be in the kdelibs commit template 
because that is the one other repos will copy and adapt.

of course I could also do that in my local git repo commit
hook - but that is not my point - if I don't know about
the requirement to notify packagers, I dont do that anyway

-- 
Wolfgang


Re: Review Request: Patch for FTP ioslave unnecessarily asks for password

2011-03-18 Thread Dawit Alemayehu


 On March 18, 2011, 11:22 p.m., David Faure wrote:
  Hmm, this whole block is inside if (failedAuth0), so this means kio_ftp 
  tried to log in, but without using the cached credentials?
  Ah, probably because it tries anonymous first. Which kind of sucks on sites 
  where you have recorded a password into kwallet...
  
  So I'm not objecting this patch, feel free to commit, but I actually think 
  a better fix would be if cached credentials, then use them for the first 
  attempt (like kio_sftp does, I think). And then the code you touched 
  (handling of failed auth) doesn't have to change.

Ah yes, you are right. What I did is completely wrong! Dunno what I was 
thinking, but I guess I saw an openPasswordDialog without 
cacheCachedAuthentication and thought... Well you get the point. Anyhow, I will 
change the code as you suggested here because it is exactly what I meant to 
accomplish with my patch.

Another thing that would even be more cool, and not just to this ioslave, is if 
cacheCachedAuthentication prompts the user to select which credential to use 
when there are mutiple stored for a given site. I guess I just added another 
item to my own TODO list! :)


- Dawit


---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100873/#review2040
---


On March 17, 2011, 2:44 p.m., Dawit Alemayehu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/100873/
 ---
 
 (Updated March 17, 2011, 2:44 p.m.)
 
 
 Review request for kdelibs.
 
 
 Summary
 ---
 
 The attached patch forces kio_ftp to first look up for cached password before 
 showing the user a prompt to enter password information. This addresses the 
 issue mentioned in 143488 and makes kio_ftp's behavior consistent with the 
 other ioslaves.
 
 
 This addresses bugs 124675 and 143488.
 http://bugs.kde.org/show_bug.cgi?id=124675
 http://bugs.kde.org/show_bug.cgi?id=143488
 
 
 Diffs
 -
 
   kioslave/ftp/ftp.cpp 038ac2e 
 
 Diff: http://git.reviewboard.kde.org/r/100873/diff
 
 
 Testing
 ---
 
 Login to an ftp site, save the password and visit the same site again. No 
 prompt.
 
 
 Thanks,
 
 Dawit
 




Re: Review Request: Patch for FTP ioslave unnecessarily asks for password

2011-03-18 Thread Dawit Alemayehu

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100873/
---

(Updated March 19, 2011, 4:37 a.m.)


Review request for kdelibs.


Changes
---

Updated patch based on David's correct observation about the problem with the 
previous patch.


Summary
---

The attached patch forces kio_ftp to first look up for cached password before 
showing the user a prompt to enter password information. This addresses the 
issue mentioned in 143488 and makes kio_ftp's behavior consistent with the 
other ioslaves.


This addresses bugs 124675 and 143488.
http://bugs.kde.org/show_bug.cgi?id=124675
http://bugs.kde.org/show_bug.cgi?id=143488


Diffs (updated)
-

  kioslave/ftp/ftp.cpp 95c4450 

Diff: http://git.reviewboard.kde.org/r/100873/diff


Testing
---

Login to an ftp site, save the password and visit the same site again. No 
prompt.


Thanks,

Dawit