#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
- Fix typo.
- Fix invalid usage of tr() in ServiceBrowser.
- Remove plural form in Debugger.
- Give ElfReader a proper tr()-context.
Change-Id: Id3172f0e093fd5fbe328061d32d2ba7fcfebaca7
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
When using clang's libc++, unistd.h is not pulled in automatically
anymore (like libstdc++ does). Include unistd.h on UNIX explicitly
instead.
Change-Id: I21dae6ab2446aca258877e9a2ebe1f7d0a4ef59f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
test if the embedded lib works before avahi, to avoid slow
startup on repeated startups when the avahi lib is present
but the daemon does not work.
Change-Id: I5c07ed3513c51065b2cb164e6131b7b85236acfd
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Wait 5s+ time to start the query instead ot 5s seconds in total
(should be better on slow machines, as the waiting time is not shortened).
Change-Id: I11104b314c4388a0f8ab84fca662f2e57e6e9b6a
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
give enough startup time, while still quickly bailing out when quitting
Change-Id: I628621099e9ead4defc4613615ccb5e8303ff2df
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
* fixed race condition in destruction (hopefully ;)
* cleaned startup status testing in MainConnection
* faster shutdown/startup, less blocking in embedded lib getProperty
Change-Id: I3e9062fa59465523feb47ba195cf4ef465d2c16c
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
* support windows without apple bonjour installed
* avahi with autorefresh
* less spurious updates (messages when nothing actually changes)
* quickly give up on connecting to daemon the first time
* added startedBrowsing signal
Change-Id: I8a29d94040fa6ffae318c98782120123093d6616
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This changes the hadError signal replacing it with errorMessage and hadFailure.
code using it will need fixing
Change-Id: Idf271b1d166242788e1059cdd019aa9473a09d74
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@nokia.com>
QString::fromLocal8Bit() and QString::fromUtf8() are much more slower
than an obvious QString::fromLatin1() and QLatin1String(), so this
commit changes some places where these functions are really not
needed.
QString::fromLatin1() is used in case if QString object is used
immediately (something like QString::fromLatin1().arg()),
QLatin1String is used otherwise like in other places (for example,
QPixmap(QLatin1String("..."))) - to allow to use default QString
constructor and work with QT_NO_CAST_FROM_ASCII.
Change-Id: Ib6eb1c61e9cb35c7c5b7569fea77c5e41d32621a
Reviewed-by: hjk <qthjk@ovi.com>
Introduce #ifdefs for incompatible changes in QAtomicPointer
and QAtomicInt.
Change-Id: Ice03a2cc8b3aed174e549827cfcf737764c41642
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Replacing function declaration with local variable definition.
Change-Id: I8fd9be2bd83bab9a61c93361ce1da517315f0495
Reviewed-by: Bill King <bill.king@nokia.com>
Trying to avoid long lines and fixing other spacing issues.
Change-Id: Ie0024743ef66c52a7922be046a8f7d8701a94ad6
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Renamed initLib to setDefaultZConfLib.
Use shared pointers for libs: avoid small leak for each call to initLib.
Renamed nativeLib to more logical dnsSdLib.
Print in ~ServiceBrowserPrivate only if DEBUG_ZEROCONF.
Change-Id: Icf76bba490c2ece46769253555b28c1220b44c23
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Asynchronous startBrowsing (quick return), and avoid infinite
retry if daemon starts but stops due to insufficient privilegies.
Change-Id: I2b4ef5b5ad9ab0a581d2ac169eeac3ba73df5376
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Correct exports, fixed commented out ifdef, moved socket including to a separate header.
Change-Id: Iadb6f58e2c3dbadee411fc0df7c7519c1d90309d
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* supports avahi through its native interface
* starts embedded deamon if found
* tested all fallbacks on ubuntu
* Service is a normal object now
* several smaller improvements
Change-Id: I36288ec6fcefb64a60b6284e4d86d4b589ba37b5
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>