core: Fix compilation error

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
core: Drop --help-qt command line option

Options differ in Qt5 and there's not much use for it anyway.

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
core: Remove useless code

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
Remove dangerous cast possibilities

Now e.g. `if (Account() == Contact())' does not compile. Previously it
did.

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
Use std::shared_ptr instead of QSharedPointer for StoragePoint

Initially I used that to be 100% sure QWeakPointer is not used as an
actual weak reference to QSharedPointer but having standard type instead
of Qt replacement is nice anyway, so I'm committing this.

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
Use std::shared_ptr instead of QSharedPointer for Providers

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Use QPointer for QObject tracking instead of QWeakPointer

QWeakPointer is pretty much unusable for this purpose in Qt5. Its only
purpose is to represent a weak reference to a QSharedPointer.

BTW, QPointer has the big advantage of actually having implicit T* conversion
operator and operator->() so you don't have to use the data() method
everywhere. I converted some usages with a very conservative grep+sed:

git grep '\.data()->' | egrep -vi \
	'account|avatar|budd|group|chat|contact|file|identit|message|proxy|encryption_ng' \
	| cut -f1 -d: | sort -u | xargs sed -i 's/\.data()->/->/g'

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Convert most Q_WS_* usage instances

Some Q_WS_X11 are left - these code fragments will require further work
(I have ideas, will do the work some time soon).

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Use QRegExp::captureCount() instead of the old numCaptures()

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Do not use deprecated QCoreApplication::argv() function

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Use QFileDialog::setNameFilter() instead of obsolete setFilter() overload

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
core: Port Updates class to QNetworkAccessManager

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Use QUuid::toString()

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Fix Qt3 support signal usage

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Do not paint outside paint event

Besides allowing for compilation with Qt 5, it fixes the drop marker on
Windows even on Qt 4, too. No known regressions.

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Use QCoreApplication where applicable

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
core: Always save configuration in response to commitDataRequest()

Any session manager, including KDE and Windows may legitimately just
kill the application after commitData().

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Add missing includes and delete unneeded ones

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Do not forward declare QStyleOptionViewItemV4

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
qt5: Add missing Q_DECLARE_METATYPE

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>