Fix come compile warnings from Clang 3.1

This commit is contained in:
John Maguire 2012-06-04 17:43:42 +02:00
parent 2aafdf06e0
commit c62e996607
2 changed files with 2 additions and 17 deletions

View File

@ -64,7 +64,7 @@
// hence the lack of templating here.
class ScopedIOObject {
public:
explicit ScopedIOObject(io_object_t object = NULL)
explicit ScopedIOObject(io_object_t object = 0)
: object_(object) {
}
@ -238,21 +238,6 @@ QString GetUSBRegistryEntryString(io_object_t device, CFStringRef key) {
return QString();
}
quint64 GetUSBRegistryEntryInt64(io_object_t device, CFStringRef key) {
ScopedCFTypeRef<CFNumberRef> registry_num((CFNumberRef)GetUSBRegistryEntry(device, key));
if (registry_num) {
qint64 ret = -1;
Boolean result = CFNumberGetValue(registry_num.get(), kCFNumberLongLongType, &ret);
if (!result || ret < 0) {
return 0;
} else {
return ret;
}
}
return 0;
}
NSObject* GetPropertyForDevice(io_object_t device, CFStringRef key) {
CFMutableDictionaryRef properties;
kern_return_t ret = IORegistryEntryCreateCFProperties(

View File

@ -97,7 +97,7 @@ void SearchTargetWrapper::SetEnabled(bool enabled) {
MacLineEdit::MacLineEdit(QWidget* parent)
: QMacCocoaViewContainer(0, parent),
LineEditInterface(this) {
setAttribute(Qt::WA_PaintOnScreen);
setAttribute(Qt::WA_NativeWindow);
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSSearchField* search = [[NSSearchField alloc] init];