Re: Supporting MSVC2010 in ktexteditor framework

2015-01-29 Thread Ivan Čukić
 My opinion is still the same on this matter: VS2012 (aka MSVC11).

I guessed as much. Just wanted to get the ball rolling again so that
we can reach a decision, instead of just talking about it.

I also think that (while insufficient for the most fun things of
c++11) MSVC11 (VS12) is the currently sanest choice (for frameworks).

If the ball stops again, I'll consider this a decision well made. :)

Cheers,
Ivan

On 29 January 2015 at 15:52, Ivan Čukić ivan.cu...@gmail.com wrote:
 My opinion is still the same on this matter: VS2012 (aka MSVC11).

 I guessed as much. Just wanted to get the ball rolling again so that
 we can reach a decision, instead of just talking about it.

 I also think that (while insufficient for the most fun things of
 c++11) MSVC11 (VS12) is the currently sanest choice.

 Cheers,
 Ivan


 Regards.
 --
 Kévin Ottens, http://ervin.ipsquad.net

 KDAB - proud supporter of KDE, http://www.kdab.com


 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel




 --
 KDE, ivan.cu...@kde.org, http://ivan.fomentgroup.org/
 gpg key id: 850B6F76



-- 
Cheerio,
Ivan

--
While you were hanging yourself on someone else's words
Dying to believe in what you heard
I was staring straight into the shining sun
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2015-01-29 Thread Ivan Čukić
Hi all,

So, the thread died out again.

Who is in favour of the following:
- Require MSVC10 like (aka status quo)
- Require MSVC11
- Require MSVC12

(it would be nice to get the input from kde windows guys as well)

Cheerio,
Ivan




On 17 November 2014 at 14:41, Kai Uwe Broulik k...@privat.broulik.de wrote:

   - initializer lists
  Unsupported on VS2012.

 Again, seems to be that CTP thingie, damn. (though, again, the initializer
 lists should also be tested - maybe they also work if the number of arguments
 is less than ...)

 I've had problems with them even on VS2013, like return QHashint, 
 QByteArray({ {FooRole, foo} });
 For QAbstractListModel::roleNames() which worked fine in recent clang and gcc.
 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel



-- 
Cheerio,
Ivan

--
While you were hanging yourself on someone else's words
Dying to believe in what you heard
I was staring straight into the shining sun
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2015-01-29 Thread Andrius da Costa Ribas
+1 for VC12 (I'm using msvc 2013)

--
Andrius.

2015-01-29 6:49 GMT-02:00 Ivan Čukić ivan.cu...@kde.org:

 Hi all,

 So, the thread died out again.

 Who is in favour of the following:
 - Require MSVC10 like (aka status quo)
 - Require MSVC11
 - Require MSVC12

 (it would be nice to get the input from kde windows guys as well)

 Cheerio,
 Ivan




 On 17 November 2014 at 14:41, Kai Uwe Broulik k...@privat.broulik.de
 wrote:
 
- initializer lists
   Unsupported on VS2012.
 
  Again, seems to be that CTP thingie, damn. (though, again, the
 initializer
  lists should also be tested - maybe they also work if the number of
 arguments
  is less than ...)
 
  I've had problems with them even on VS2013, like return QHashint,
 QByteArray({ {FooRole, foo} });
  For QAbstractListModel::roleNames() which worked fine in recent clang
 and gcc.
  ___
  Kde-frameworks-devel mailing list
  Kde-frameworks-devel@kde.org
  https://mail.kde.org/mailman/listinfo/kde-frameworks-devel



 --
 Cheerio,
 Ivan

 --
 While you were hanging yourself on someone else's words
 Dying to believe in what you heard
 I was staring straight into the shining sun
 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2015-01-29 Thread Milian Wolff
On Thursday 29 January 2015 11:56:51 Kevin Ottens wrote:
 On Thursday 29 January 2015 09:49:58 Ivan Čukić wrote:
  Hi all,
  
  So, the thread died out again.
  
  Who is in favour of the following:
  - Require MSVC10 like (aka status quo)
  - Require MSVC11
  - Require MSVC12
 
 My opinion is still the same on this matter: VS2012 (aka MSVC11).

+1
-- 
Milian Wolff
m...@milianw.de
http://milianw.de
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-17 Thread Ivan Čukić
On Monday, 17 November 2014 07:33:00 Kevin Ottens wrote:
 On Sunday 16 November 2014 18:01:04 Ivan Čukić wrote:
  Hi,
  
  The topic of increasing the compiler versions we require might have been
  started for the specific issue one of the frameworks had, but I think it
  shouldn't have died out when the issue in question got patched.
  
  IMO, this topic requires more consideration.
 
 Agreed, and thanks for a tentative improvement at the features white list to
 that effect.
 
  Some of the features that we could use if we raise msvc version to 11.0
  and
  gcc to 4.6 or 4.7:
  - range-based for loops
 
 Agreed.
 
  - variadic templates
 
 Are you sure about that? IME variadic templates unfortunately don't work

Yeah, it looks like I've been looking at the CTP from November 2012 - for VS11 
[1]. It would be awesome if somebody who has VS11 actually investigated this. 
Namely, the 11.0 proper should support variadics up to some number of 
arguments (yes, sounds really daft and hackish). If true, it would be able to 
cover more than a few use-cases I reckon.

 with that one. They are listed as unsupported here:
 http://msdn.microsoft.com/en-us/library/vstudio/hh567368%28v=vs.110%29.aspx
 
  - override and final (gcc 4.7)
 
 Agreed.
 
  - delegating constructors (gcc 4.7)
 Unsupported on VS2012.
  - initializer lists
 Unsupported on VS2012.

Again, seems to be that CTP thingie, damn. (though, again, the initializer 
lists should also be tested - maybe they also work if the number of arguments 
is less than ...)

 Here is a few more for consideration:
  * Strongly typed enums
  * extern templates
  * trailing return types
  * decltype
  * static_assert

Yes, forgot those. +1

Cheerio,
Ivan

[1] https://wiki.apache.org/stdcxx/C++0xCompilerSupport


KDE, ivan.cukic at kde.org, http://ivan.fomentgroup.org/
gpg key id: 850B6F76, keyserver.pgp.com
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-17 Thread Ivan Čukić

 Yeah, it looks like I've been looking at the CTP from November 2012 - for
 VS11 [1]. It would be awesome if somebody who has VS11 actually
 investigated this. Namely, the 11.0 proper should support variadics up to
 some number of arguments (yes, sounds really daft and hackish). If true, it
 would be able to cover more than a few use-cases I reckon.

I managed to ping someone to test this - it seems that the 'we support 
variadic templates up to a predefined number of arguments' means that they 
have a lot of fun macros that make their STL implementation behave like there 
are variadics. They do not support typename... syntax.

Damn!


--
Cheerio,
Ivan


KDE, ivan.cukic at kde.org, http://ivan.fomentgroup.org/
gpg key id: 850B6F76, keyserver.pgp.com
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-17 Thread Nicolás Álvarez

 El 17/11/2014, a las 06:03, Ivan Čukić ivan.cu...@kde.org escribió:
 
 On Monday, 17 November 2014 07:33:00 Kevin Ottens wrote:
 On Sunday 16 November 2014 18:01:04 Ivan Čukić wrote:
 - initializer lists
 Unsupported on VS2012.
 
 Again, seems to be that CTP thingie, damn. (though, again, the initializer 
 lists should also be tested - maybe they also work if the number of arguments 
 is less than ...)

Apparently, MSVC2013 introduces initializer lists, but has such a serious bug 
(calling destructors twice in certain cases) that Qt pretends it doesn't 
support them and doesn't enable them in eg. containers, unless you have 
MSVC2013 Update 2 which fixes the bug. I'd expect the 2012 CTP to be similarly 
unusable wrt initializer lists.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-17 Thread Nicolás Alvarez
El domingo, 16 de noviembre de 2014, Ivan Čukić ivan.cu...@kde.org
escribió:

 Hi,

 The topic of increasing the compiler versions we require might have been
 started for the specific issue one of the frameworks had, but I think it
 shouldn't have died out when the issue in question got patched.


The issue in question didn't yet get patched actually. I submitted proposed
patches on separate git branches, and reviewing them is part of this
discussion: if anyone thinks the patches I committed to the msvc2010 branch
of the ktexteditor repo aren't acceptable, that's another argument for
switching to 2012.

Should I submit to reviewboard?


-- 
Nicolás
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-17 Thread Kai Uwe Broulik

   - initializer lists
  Unsupported on VS2012.

 Again, seems to be that CTP thingie, damn. (though, again, the initializer 
 lists should also be tested - maybe they also work if the number of arguments 
 is less than ...)

I've had problems with them even on VS2013, like return QHashint, 
QByteArray({ {FooRole, foo} });
For QAbstractListModel::roleNames() which worked fine in recent clang and gcc.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-16 Thread Ivan Čukić
Hi,

The topic of increasing the compiler versions we require might have been
started for the specific issue one of the frameworks had, but I think it
shouldn't have died out when the issue in question got patched.

IMO, this topic requires more consideration.

Some of the features that we could use if we raise msvc version to 11.0 and
gcc to 4.6 or 4.7:
- range-based for loops
- variadic templates
- override and final (gcc 4.7)
- delegating constructors (gcc 4.7)
- initializer lists
- proper implementation of lambdas and move semantics

Cheerio,
Ivan

--
While you were hanging yourself on someone else's words
Dying to believe in what you heard
I was staring straight into the shining sun
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-16 Thread Kevin Ottens
On Sunday 16 November 2014 18:01:04 Ivan Čukić wrote:
 Hi,
 
 The topic of increasing the compiler versions we require might have been
 started for the specific issue one of the frameworks had, but I think it
 shouldn't have died out when the issue in question got patched.
 
 IMO, this topic requires more consideration.

Agreed, and thanks for a tentative improvement at the features white list to 
that effect.

 Some of the features that we could use if we raise msvc version to 11.0 and
 gcc to 4.6 or 4.7:
 - range-based for loops

Agreed.

 - variadic templates

Are you sure about that? IME variadic templates unfortunately don't work with 
that one. They are listed as unsupported here:
http://msdn.microsoft.com/en-us/library/vstudio/hh567368%28v=vs.110%29.aspx

 - override and final (gcc 4.7)

Agreed.

 - delegating constructors (gcc 4.7)

Unsupported on VS2012.

 - initializer lists

Unsupported on VS2012.

 - proper implementation of lambdas and move semantics

Yep, those two were already in the white list, we kind of cut a corner there.

Looks like the white list changes will be shorter than what you propose 
unfortunately.

Here is a few more for consideration:
 * Strongly typed enums
 * extern templates
 * trailing return types
 * decltype
 * static_assert

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com



signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Kevin Ottens
On Wednesday 05 November 2014 08:53:42 Mirko Boehm wrote:
 Hi,
 
  On 05 Nov 2014, at 04:33, Nicolás Alvarez nicolas.alva...@gmail.com
  wrote:
  
  So, I hereby propose making an exception and bumping the minimum
  compiler version *for ktexteditor only* to MSVC2012. Opinions?
 
 I propose to bump the required compiler versions across the board to
 compilers that fully 100% implement C++11. It is 2014 and C++14 is
 finalised. And we are a Free Software project and none of our compilers
 have any problems with that.

In the case of VC there's no such compiler yet. Even VS2013 is not 100% 
compliant.

 In more general terms, the benefits we can gain from fully utilising our
 excellent programming language outweigh by far the potential fringe utility
 of gaining 0.5% users of non-free outdated compilers.

I strongly disagree here because of the above. There's quite a few potential 
users on non-free platforms (some I already talked to in fact). It happens 
that one of those platforms is Windows where VC is the most pervasive 
compiler.

Now, my experience when visiting customers is that quite a few are still stuck 
with VS2010 but the majority seems to be actively using VS2012 now. Early on I 
was wondering if those VS2010 users could be using our stuff, I'm more and 
more thinking with their profile it won't be the case.

I'd then propose as a possibility a more reasoned approach: bump the 
dependency from VC2010 to VC2012, in turn white list more of the C++11 
features.

I'd say that if we go in this direction, Nicolás is the best placed to update 
the wiki page with the white list.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com



signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Kevin Ottens
Hello,

On Wednesday 05 November 2014 08:58:04 Martin Graesslin wrote:
 So in stead of adding one exception after the other, just go the full way
 and raise the requirement.

I'm rather against per framework exception too. That said, raising the 
requirement should be done responsibly regarding the goals of KDE Frameworks 
which are also diffusing it's use outside of our community in general, it's 
use outside our own workspace in particular.
 
 The fact that we don't have a CI to test it just shows even more that we
 need to raise the minimum requirement.

That's a very wrong line of argument... It shows that we should have better 
platform coverage in our CI. We don't really have CI for Mac OS X either and 
we break path related stuff there from time to time. Shall we Mac OS X support 
then? Slippery slope...
 
 Cheers
 Martin
 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com



signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Kevin Ottens
On Wednesday 05 November 2014 09:05:19 Milian Wolff wrote:
 On Wednesday 05 November 2014 00:33:58 Nicolás Alvarez wrote:
  So, I hereby propose making an exception and bumping the minimum
  compiler version *for ktexteditor only* to MSVC2012. Opinions?
 
 OK from my side, but I'd say Christoph and Dominik should have the last say.
 Note that KDevelop does the same. We want to have fun working on the
 project, and imo using C++11 is more important in that regard then
 supporting MSVC2010.

OTOH you don't really have this need in kdevelop. It's pretty much a KDE 
Frameworks thing (e.g. on Zanshin I don't apply those constraints at all).
 
Cheers.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com



signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Mirko Boehm
Hi!

 On 05 Nov 2014, at 09:02, Kevin Ottens er...@kde.org wrote:
 
 I propose to bump the required compiler versions across the board to
 compilers that fully 100% implement C++11. It is 2014 and C++14 is
 finalised. And we are a Free Software project and none of our compilers
 have any problems with that.
 
 In the case of VC there's no such compiler yet. Even VS2013 is not 100% 
 compliant.

There will always be small differences. The big picture is important. And the 
big picture IMO is that restricting ourselves in 2015 to the feature set of a 
compiler released in 2009 and is two major revisions of the language behind is 
bonkers. It also deters more users and contributors than we can ever gain with 
it (that is my similarly unprovable claim :-) ). My reasoning is that KDE’s 
frameworks need to be showcases of excellent pieces of software to attract 
users and contributors and this limitation plays against that.

 In more general terms, the benefits we can gain from fully utilising our
 excellent programming language outweigh by far the potential fringe utility
 of gaining 0.5% users of non-free outdated compilers.
 
 I strongly disagree here because of the above. There's quite a few potential 
 users on non-free platforms (some I already talked to in fact). It happens 
 that one of those platforms is Windows where VC is the most pervasive 
 compiler.
 
 Now, my experience when visiting customers is that quite a few are still 
 stuck 
 with VS2010 but the majority seems to be actively using VS2012 now. Early on 
 I 
 was wondering if those VS2010 users could be using our stuff, I'm more and 
 more thinking with their profile it won't be the case.

“Potential users” are a void claim without any data to back this up, and we do 
not have any data AFAIK. In todays numbers, these potential users (who aren’t 
users yet) are not a significant group. I would say that a reasonable threshold 
to consider such a limitation would be something like 20% or even 10% of 
existing contributors. From what I can tell, those Windows developers that 
contribute use more modern VC compilers than 2010. 

If need be, ask the contributors for their preference. Poll for it. Do 
something about it. I do not think that this limitation in language features 
has the support of the contributors. 

Cheers, 

Mirko.
-- 
Mirko Boehm | mi...@kde.org | KDE e.V.
FSFE Fellow, FSFE Team Germany
Qt Certified Specialist

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Ben Cooksley
On Wed, Nov 5, 2014 at 9:07 PM, Kevin Ottens er...@kde.org wrote:
 Hello,

Hi all,


 On Wednesday 05 November 2014 08:58:04 Martin Graesslin wrote:
 So in stead of adding one exception after the other, just go the full way
 and raise the requirement.

 I'm rather against per framework exception too. That said, raising the
 requirement should be done responsibly regarding the goals of KDE Frameworks
 which are also diffusing it's use outside of our community in general, it's
 use outside our own workspace in particular.

Per framework exceptions will likely lead to confusion as to which
compilers must be used for which framework.
Plus, if we do get CI implemented for Windows at some point, having
different compilers around is just a recipe for problems.


 The fact that we don't have a CI to test it just shows even more that we
 need to raise the minimum requirement.

 That's a very wrong line of argument... It shows that we should have better
 platform coverage in our CI. We don't really have CI for Mac OS X either and
 we break path related stuff there from time to time. Shall we Mac OS X support
 then? Slippery slope...

Raising the requirement would be a valid argument if we had a Windows
CI system that ran a given version (assuming we couldn't downgrade it
or do any testing with the older version).

In this case, we don't have a Windows CI system so this line of
reasoning leads very quickly to the conclusion of: we should only
support (and therefore publish minimum requirements for) those systems
we CI test for. Which at the moment is just gcc 4.8 on Linux.


 Cheers
 Martin
 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

 --
 Kévin Ottens, http://ervin.ipsquad.net

 KDAB - proud supporter of KDE, http://www.kdab.com

Cheers,
Ben



 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Cristian Oneț
2014-11-05 9:58 GMT+02:00 Martin Graesslin mgraess...@kde.org:
 On Wednesday 05 November 2014 08:53:42 Mirko Boehm wrote:
 Hi,

  On 05 Nov 2014, at 04:33, Nicolás Alvarez nicolas.alva...@gmail.com
  wrote:
 
  So, I hereby propose making an exception and bumping the minimum
  compiler version *for ktexteditor only* to MSVC2012. Opinions?

 I propose to bump the required compiler versions across the board to
 compilers that fully 100% implement C++11. It is 2014 and C++14 is
 finalised. And we are a Free Software project and none of our compilers
 have any problems with that.

 I support this. I'm currently facing the problem that at some point we might
 want kwayland to become a framework to be able to be used in
 kwindowsystem. But the compiler requirements would not allow it, although it
 doesn't make any sense for the case of kwayland (nobody is going to use that
 on Windows).

 So in stead of adding one exception after the other, just go the full way and
 raise the requirement.

 The fact that we don't have a CI to test it just shows even more that we need
 to raise the minimum requirement.


+1, we came to this conclusion when we discussed this issue at Randa
(in the KDE SDK group), C++11 rules out MSVC 2010 and there is really
no reason to keep backward compatibility.

Regards,
Cristian

 Cheers
 Martin
 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Christoph Cullmann
 2014-11-05 9:58 GMT+02:00 Martin Graesslin mgraess...@kde.org:
  On Wednesday 05 November 2014 08:53:42 Mirko Boehm wrote:
  Hi,
 
   On 05 Nov 2014, at 04:33, Nicolás Alvarez nicolas.alva...@gmail.com
   wrote:
  
   So, I hereby propose making an exception and bumping the minimum
   compiler version *for ktexteditor only* to MSVC2012. Opinions?
 
  I propose to bump the required compiler versions across the board to
  compilers that fully 100% implement C++11. It is 2014 and C++14 is
  finalised. And we are a Free Software project and none of our compilers
  have any problems with that.
 
  I support this. I'm currently facing the problem that at some point we
  might
  want kwayland to become a framework to be able to be used in
  kwindowsystem. But the compiler requirements would not allow it, although
  it
  doesn't make any sense for the case of kwayland (nobody is going to use
  that
  on Windows).
 
  So in stead of adding one exception after the other, just go the full way
  and
  raise the requirement.
 
  The fact that we don't have a CI to test it just shows even more that we
  need
  to raise the minimum requirement.
 
 
 +1, we came to this conclusion when we discussed this issue at Randa
 (in the KDE SDK group), C++11 rules out MSVC 2010 and there is really
 no reason to keep backward compatibility.
Hi,

I think all frameworks should require the same level of C++ features,
therefore either we patch ktexteditor to the same level back (which
is no big issue I think, beside the unit tests, but thats fixable)
or we raise the bar for all frameworks.

Greetings
Christoph

-- 
- Dr.-Ing. Christoph Cullmann -
AbsInt Angewandte Informatik GmbH  Email: cullm...@absint.com
Science Park 1 Tel:   +49-681-38360-22
66123 Saarbrücken  Fax:   +49-681-38360-20
GERMANYWWW:   http://www.AbsInt.com

Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Allen Winter
On Wednesday, November 05, 2014 12:33:58 AM Nicolás Alvarez wrote:
 Hi all,
 
 According to https://community.kde.org/Frameworks/C++11, KDE
 Frameworks support MSVC2010 and later versions. Since ktexteditor is
 part of KF5, it is supposed to work on MSVC2010. It currently doesn't;
 several unsupported C++11 features were introduced to the library in
 the past few months.
 
 We really really need a Windows CI so that this is noticed early :(
 
 The unsupported C++ features include:
 - brace initialization: Cursor x = {0,0}; or return {};
 - delegating constructors
 - range-based for loops
 - initializing class members inside the class declaration instead of
 doing it in the constructor: class Foo { int x=42; }; (N2756)
 - not specifying the return type of lambdas: auto f = []() { return 42; }
 
 I attached the patch that makes ktexteditor build with MSVC2010,
 except for a unit test where there's WAY too many brace-init. In my
 opinion, the code looks cleaner with these C++11 features, ie. before
 the patch.
 
 So, I hereby propose making an exception and bumping the minimum
 compiler version *for ktexteditor only* to MSVC2012. Opinions?
 
 
Let's put something like this in our top-level CMake stuff (copy+pasted from 
GammaRay):

# Exit for blacklisted compilers (those that don't support C++11 very well)
#  MSVC++ 8.0  _MSC_VER == 1400 (Visual Studio 2005)
#  Clang 3.0
set(BAD_CXX_MESSAGE )
if(MSVC)
  if(MSVC_VERSION LESS 1500)
set(BAD_CXX_MESSAGE MSVC 2008 or higher)
  endif()
endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
  if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.1.0)
set(BAD_CXX_MESSAGE Clang v3.1.0 or higher)
  endif()
endif()
if(BAD_CXX_MESSAGE)
  message(FATAL_ERROR \nSorry, ${BAD_CXX_MESSAGE} is required to build this 
software. Please retry using a modern compiler that supports C++11 lambdas.)
endif()

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Kevin Ottens
Hello,

On Wednesday 05 November 2014 09:25:27 Mirko Boehm wrote:
  On 05 Nov 2014, at 09:02, Kevin Ottens er...@kde.org wrote:
  I propose to bump the required compiler versions across the board to
  compilers that fully 100% implement C++11. It is 2014 and C++14 is
  finalised. And we are a Free Software project and none of our compilers
  have any problems with that.
  
  In the case of VC there's no such compiler yet. Even VS2013 is not 100%
  compliant.
 
 There will always be small differences.

We're not talking about small differences here. We're talking about boatloads 
of unusable features.

 From what I can tell, those Windows developers that contribute use more
 modern VC compilers than 2010.

That's why I said let's bump it to 2012 in my previous email:
I'd then propose as a possibility a more reasoned approach: bump the 
dependency from VC2010 to VC2012, in turn white list more of the C++11 
features.

I see 2013 almost nowhere yet. VS14 is not out yet, that's the only one which 
will be fully compliant.

VS2012 hits the sweet spot of being relatively widespread while starting to 
have a useful subset of C++11 (case in point ktexteditor which prompted this 
thread builds with it).

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com



signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Milian Wolff
On Wednesday 05 November 2014 14:35:07 Kevin Ottens wrote:
 Hello,
 
 On Wednesday 05 November 2014 09:25:27 Mirko Boehm wrote:
   On 05 Nov 2014, at 09:02, Kevin Ottens er...@kde.org wrote:
   I propose to bump the required compiler versions across the board to
   compilers that fully 100% implement C++11. It is 2014 and C++14 is
   finalised. And we are a Free Software project and none of our compilers
   have any problems with that.
   
   In the case of VC there's no such compiler yet. Even VS2013 is not 100%
   compliant.
  
  There will always be small differences.
 
 We're not talking about small differences here. We're talking about
 boatloads of unusable features.
 
  From what I can tell, those Windows developers that contribute use more
  modern VC compilers than 2010.
 
 That's why I said let's bump it to 2012 in my previous email:
 I'd then propose as a possibility a more reasoned approach: bump the
 dependency from VC2010 to VC2012, in turn white list more of the C++11
 features.
 
 I see 2013 almost nowhere yet. VS14 is not out yet, that's the only one
 which will be fully compliant.
 
 VS2012 hits the sweet spot of being relatively widespread while starting to
 have a useful subset of C++11 (case in point ktexteditor which prompted this
 thread builds with it).

Yes, let's go for 2012 everywhere!

Bye
-- 
Milian Wolff
m...@milianw.de
http://milianw.de
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Nicolás Alvarez
2014-11-05 10:35 GMT-03:00 Kevin Ottens er...@kde.org:
 VS2012 hits the sweet spot of being relatively widespread while starting to
 have a useful subset of C++11 (case in point ktexteditor which prompted this
 thread builds with it).

Actually I just found it doesn't build with VS2012 either, ugh. And I
expected the fixes to be easier, but it seems I still have to fix the
unit test full of brace initializers for 2012 to work.

Ignoring for a moment the question of 2010, do we all agree on
supporting 2012, and not bumping the minimum to 2013? If so, I'll
start submitting patches to ktexteditor for 2012 support now, and then
we can go back to discussing 2010 :)

-- 
Nicolás
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Sven Brauch
 Actually I just found it doesn't build with VS2012 either, ugh. And I
 expected the fixes to be easier, but it seems I still have to fix the
 unit test full of brace initializers for 2012 to work.
I will fix that, after all it's my fault it looks like this. Just tell
me what features I can't use.

Greetings!
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-05 Thread Nicolás Alvarez
2014-11-05 15:18 GMT-03:00 Nicolás Alvarez nicolas.alva...@gmail.com:
 2014-11-05 10:35 GMT-03:00 Kevin Ottens er...@kde.org:
 VS2012 hits the sweet spot of being relatively widespread while starting to
 have a useful subset of C++11 (case in point ktexteditor which prompted this
 thread builds with it).

 Actually I just found it doesn't build with VS2012 either, ugh. And I
 expected the fixes to be easier, but it seems I still have to fix the
 unit test full of brace initializers for 2012 to work.

 Ignoring for a moment the question of 2010, do we all agree on
 supporting 2012, and not bumping the minimum to 2013? If so, I'll
 start submitting patches to ktexteditor for 2012 support now, and then
 we can go back to discussing 2010 :)

I have pushed fixes to make KTextEditor compile on Visual C++ 2012 and
2010 to git branches.

-- 
Nicolás
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Supporting MSVC2010 in ktexteditor framework

2014-11-04 Thread Nicolás Alvarez
Hi all,

According to https://community.kde.org/Frameworks/C++11, KDE
Frameworks support MSVC2010 and later versions. Since ktexteditor is
part of KF5, it is supposed to work on MSVC2010. It currently doesn't;
several unsupported C++11 features were introduced to the library in
the past few months.

We really really need a Windows CI so that this is noticed early :(

The unsupported C++ features include:
- brace initialization: Cursor x = {0,0}; or return {};
- delegating constructors
- range-based for loops
- initializing class members inside the class declaration instead of
doing it in the constructor: class Foo { int x=42; }; (N2756)
- not specifying the return type of lambdas: auto f = []() { return 42; }

I attached the patch that makes ktexteditor build with MSVC2010,
except for a unit test where there's WAY too many brace-init. In my
opinion, the code looks cleaner with these C++11 features, ie. before
the patch.

So, I hereby propose making an exception and bumping the minimum
compiler version *for ktexteditor only* to MSVC2012. Opinions?

-- 
Nicolás
diff --git a/autotests/src/script_test_base.cpp 
b/autotests/src/script_test_base.cpp
index 2799211..58d77d7 100644
--- a/autotests/src/script_test_base.cpp
+++ b/autotests/src/script_test_base.cpp
@@ -161,7 +161,7 @@ void ScriptTestBase::runTest(const ExpectedFailures 
failures)
 QTextStream(stdout)  out  endl;
 }
 
-for (const Failure failure : failures) {
+Q_FOREACH (const Failure failure, failures) {
 QEXPECT_FAIL(failure.first, failure.second, Abort);
 }
 
diff --git a/src/document/katedocument.cpp b/src/document/katedocument.cpp
index 9a809fa..074c3f5 100644
--- a/src/document/katedocument.cpp
+++ b/src/document/katedocument.cpp
@@ -147,6 +147,7 @@ KTextEditor::DocumentPrivate::DocumentPrivate(bool 
bSingleViewMode,
   editSessionNumber(0),
   editIsRunning(false),
   m_undoMergeAllEdits(false),
+  m_editingStackPosition(-1),
   m_undoManager(new KateUndoManager(this)),
   m_editableMarks(markType01),
   m_annotationModel(0),
diff --git a/src/document/katedocument.h b/src/document/katedocument.h
index 8e93f7a..8920f17 100644
--- a/src/document/katedocument.h
+++ b/src/document/katedocument.h
@@ -362,7 +362,7 @@ private:
 bool editIsRunning;
 bool m_undoMergeAllEdits;
 QStackQSharedPointerKTextEditor::MovingCursor m_editingStack;
-int m_editingStackPosition = -1;
+int m_editingStackPosition;
 static const int s_editingStackSizeLimit = 32;
 
 //
diff --git a/src/script/katescript.h b/src/script/katescript.h
index fcc99d1..80c7924 100644
--- a/src/script/katescript.h
+++ b/src/script/katescript.h
@@ -175,7 +175,7 @@ public:
 QString backtrace(const QScriptValue error, const QString header = 
QString());
 
 /** Execute a piece of code **/
-QScriptValue evaluate(const QString program, const FieldMap env={});
+QScriptValue evaluate(const QString program, const FieldMap 
env=FieldMap());
 
 /** Displays the backtrace when a script has errored out */
 void displayBacktrace(const QScriptValue error, const QString header = 
QString());
diff --git a/src/syntax/katehighlight.cpp b/src/syntax/katehighlight.cpp
index 9d885b7..2e66a2f 100644
--- a/src/syntax/katehighlight.cpp
+++ b/src/syntax/katehighlight.cpp
@@ -1176,8 +1176,8 @@ bool KateHighlighting::isInWord(QChar c, int attrib) const
 
 bool KateHighlighting::canBreakAt(QChar c, int attrib) const
 {
-static const QString sq = QStringLiteral(\');
-return (m_additionalData[ hlKeyForAttrib(attrib) 
]-wordWrapDeliminator.indexOf(c) != -1)  (sq.indexOf(c) == -1);
+return (m_additionalData[ hlKeyForAttrib(attrib) 
]-wordWrapDeliminator.indexOf(c) != -1) 
+   (QStringLiteral(\').indexOf(c) == -1);
 }
 
 QLinkedListQRegularExpression KateHighlighting::emptyLines(int attrib) const
diff --git a/src/utils/katetemplatehandler.cpp 
b/src/utils/katetemplatehandler.cpp
index abb3bd6..08f7483 100644
--- a/src/utils/katetemplatehandler.cpp
+++ b/src/utils/katetemplatehandler.cpp
@@ -122,12 +122,12 @@ KateTemplateHandler::~KateTemplateHandler()
 
 void KateTemplateHandler::sortFields()
 {
-std::sort(m_fields.begin(), m_fields.end(), [](const TemplateField l, 
const TemplateField r) {
+std::sort(m_fields.begin(), m_fields.end(), [](const TemplateField l, 
const TemplateField r) - bool {
 // always sort the final cursor pos last
-if ( l.kind == TemplateField::FinalCursorPosition ) {
+if ( l.kind == KateTemplateHandler::TemplateField::FinalCursorPosition 
) {
 return false;
 }
-if ( r.kind == TemplateField::FinalCursorPosition ) {
+if ( r.kind == KateTemplateHandler::TemplateField::FinalCursorPosition 
) {
 return true;
 }
 // sort by range
@@ -166,11 +166,11 @@ void KateTemplateHandler::jump(int by, bool initial)
 
 pos = wrap(pos);
 // choose field to jump to, 

Re: Supporting MSVC2010 in ktexteditor framework

2014-11-04 Thread Mirko Boehm
Hi, 

 On 05 Nov 2014, at 04:33, Nicolás Alvarez nicolas.alva...@gmail.com wrote:
 
 So, I hereby propose making an exception and bumping the minimum
 compiler version *for ktexteditor only* to MSVC2012. Opinions?


I propose to bump the required compiler versions across the board to compilers 
that fully 100% implement C++11. It is 2014 and C++14 is finalised. And we are 
a Free Software project and none of our compilers have any problems with that. 

In more general terms, the benefits we can gain from fully utilising our 
excellent programming language outweigh by far the potential fringe utility of 
gaining 0.5% users of non-free outdated compilers. 

Cheers, 

Mirko.
-- 
Mirko Boehm | mi...@kde.org | KDE e.V.
FSFE Fellow, FSFE Team Germany
Qt Certified Specialist

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Supporting MSVC2010 in ktexteditor framework

2014-11-04 Thread Martin Graesslin
On Wednesday 05 November 2014 08:53:42 Mirko Boehm wrote:
 Hi,
 
  On 05 Nov 2014, at 04:33, Nicolás Alvarez nicolas.alva...@gmail.com
  wrote:
  
  So, I hereby propose making an exception and bumping the minimum
  compiler version *for ktexteditor only* to MSVC2012. Opinions?
 
 I propose to bump the required compiler versions across the board to
 compilers that fully 100% implement C++11. It is 2014 and C++14 is
 finalised. And we are a Free Software project and none of our compilers
 have any problems with that.

I support this. I'm currently facing the problem that at some point we might 
want kwayland to become a framework to be able to be used in 
kwindowsystem. But the compiler requirements would not allow it, although it 
doesn't make any sense for the case of kwayland (nobody is going to use that 
on Windows).

So in stead of adding one exception after the other, just go the full way and 
raise the requirement.

The fact that we don't have a CI to test it just shows even more that we need 
to raise the minimum requirement.

Cheers
Martin
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel