QTfrontend/SparkleAutoUpdater.mm
author sheepluva
Fri, 14 Jan 2011 17:01:29 +0100
changeset 4840 d607e8c5a743
parent 2261 57e99c908e7c
child 5095 15dd764b728c
permissions -rw-r--r--
also convert/pngcrush png pictures with 16bit/channel (resulting in 8bit/channel) and repage their layers (as I found out that some of the pics had their layer offset the actual visual area, which makes the picture look blank in gimp)

/*
 * Copyright (C) 2008 Remko Troncon
 */

#include "SparkleAutoUpdater.h"

#include <Cocoa/Cocoa.h>
#include <Sparkle/Sparkle.h>

class SparkleAutoUpdater::Private
{
	public:
		SUUpdater* updater;
};

SparkleAutoUpdater::SparkleAutoUpdater(const QString& aUrl)
{
	d = new Private;

	d->updater = [SUUpdater sharedUpdater];
	[d->updater retain];

	NSURL* url = [NSURL URLWithString:
			[NSString stringWithUTF8String: aUrl.toUtf8().data()]];
	[d->updater setFeedURL: url];
}

SparkleAutoUpdater::~SparkleAutoUpdater()
{
	[d->updater release];
	delete d;
}

void SparkleAutoUpdater::checkForUpdates()
{
	[d->updater checkForUpdatesInBackground];
}