Changeset 63492 in vbox
- Timestamp:
- Aug 15, 2016 4:58:41 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r63291 r63492 244 244 VirtualBox_CXXFLAGS += -Wno-switch 245 245 endif 246 247 ## @todo we're using a number of deprecated APIs, please fix and remove these! 248 VirtualBox_CXXFLAGS.darwin += -Wno-deprecated-declarations 249 VirtualBox_OBJCFLAGS.darwin += -Wno-deprecated-declarations 250 VirtualBox_OBJCXXFLAGS.darwin += -Wno-deprecated-declarations 246 251 247 252 ifeq ($(KBUILD_TYPE),release) … … 1124 1129 endif # VBOX_WITH_QTGUI_V5 1125 1130 1126 $$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/1131 $$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/ 1127 1132 $(call MSG_GENERATE,VirtualBox.app,$<,$@) 1128 1133 $(QUIET)$(RM) -f $@ … … 1137 1142 $< > $@ 1138 1143 1139 $$(VirtualBox.app_0_OUTDIR)/qt.conf: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_VERSION_MK) | $$(@D)/1144 $$(VirtualBox.app_0_OUTDIR)/qt.conf: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_VERSION_MK) | $$(@D)/ 1140 1145 $(QUIET)$(RM) -f $@ 1141 1146 $(QUIET)$(APPEND) $@ "[Paths]" 1142 1147 $(QUIET)$(APPEND) $@ "Prefix =" $(PATH_OUT)/$(VirtualBox.app_INST) 1143 1148 1144 INSTALLS += VirtualBoxVM.app1145 VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/1146 VirtualBoxVM.app_MODE = 6441147 VirtualBoxVM.app_SOURCES = \1148 src/platform/darwin/VM-PkgInfo=>PkgInfo \1149 $(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist \1150 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))1151 VirtualBoxVM.app_SYMLINKS = \1152 MacOS=>../../../MacOS/1153 1154 $$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/1149 INSTALLS += VirtualBoxVM.app 1150 VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/ 1151 VirtualBoxVM.app_MODE = 644 1152 VirtualBoxVM.app_SOURCES = \ 1153 src/platform/darwin/VM-PkgInfo=>PkgInfo \ 1154 $(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist \ 1155 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),)) 1156 VirtualBoxVM.app_SYMLINKS = \ 1157 MacOS=>../../../MacOS/ 1158 1159 $$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/ 1155 1160 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@) 1156 1161 $(QUIET)$(RM) -f $@ … … 1165 1170 --output $@ $< 1166 1171 1167 PROGRAMS += vmstarter 1168 vmstarter_TEMPLATE = VBOXR3EXE 1169 vmstarter_SOURCES = src/platform/darwin/vmstarter.mm 1170 vmstarter_LDFLAGS += -framework AppKit 1171 vmstarter_INST = $(INST_BIN)vmstarter 1172 1173 INSTALLS += vmstarter.app 1174 vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/ 1175 vmstarter.app_MODE = 644 1176 vmstarter.app_SOURCES = \ 1177 src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \ 1178 $(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist \ 1179 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),)) 1180 vmstarter.app_SYMLINKS = \ 1181 MacOS=>../../../MacOS \ 1182 1183 $$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/ 1172 PROGRAMS += vmstarter 1173 vmstarter_TEMPLATE = VBOXR3EXE 1174 vmstarter_OBJCXXFLAGS += -Wno-deprecated-declarations ## @todo fix deprecate API use! 1175 vmstarter_LDFLAGS += -framework AppKit 1176 vmstarter_SOURCES = src/platform/darwin/vmstarter.mm 1177 vmstarter_INST = $(INST_BIN)vmstarter 1178 1179 INSTALLS += vmstarter.app 1180 vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/ 1181 vmstarter.app_MODE = 644 1182 vmstarter.app_SOURCES = \ 1183 src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \ 1184 $(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist \ 1185 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),)) 1186 vmstarter.app_SYMLINKS = \ 1187 MacOS=>../../../MacOS \ 1188 1189 $$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/ 1184 1190 $(call MSG_GENERATE,vmstarter.app,$<,$@) 1185 1191 $(QUIET)$(RM) -f $@ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r63305 r63492 476 476 mType(aType), 477 477 mInitialized(false) 478 { }478 { NOREF(mType); } 479 479 480 480 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r63323 r63492 4687 4687 psn.highLongOfPSN = id >> 32; 4688 4688 psn.lowLongOfPSN = (UInt32)id; 4689 # ifdef __clang__ 4690 # pragma GCC diagnostic push 4691 # pragma GCC diagnostic ignored "-Wdeprecated-declarations" 4689 4692 OSErr rc = ::SetFrontProcess(&psn); 4693 # pragma GCC diagnostic pop 4694 # else 4695 OSErr rc = ::SetFrontProcess(&psn); 4696 # endif 4690 4697 if (!rc) 4691 4698 Log(("GUI: %#RX64 couldn't do SetFrontProcess on itself, the selector (we) had to do it...\n", id)); -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaDockIconPreview.mm
r61244 r63492 212 212 - (void)drawRect:(NSRect)aRect 213 213 { 214 RT_NOREF(aRect); 214 215 NSGraphicsContext *nsContext = [NSGraphicsContext currentContext]; 215 216 CGContextRef pCGContext = (CGContextRef)[nsContext graphicsPort]; -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
r61244 r63492 43 43 #include <QMacCocoaViewContainer> 44 44 45 #if 0 /* This is a built-in according to clang. Not sure how it relates to QT_VERSION... */ 45 46 /* Interface Builder Constant, 46 47 * hmm, where is it declared with Qt4? */ … … 48 49 # define IBAction void 49 50 #endif /* QT_VERSION >= 0x050000 */ 51 #endif 50 52 51 53 /* … … 107 109 -(IBAction)clicked:(id)sender 108 110 { 111 RT_NOREF(sender); 109 112 mRealTarget->onClicked(); 110 113 } … … 225 228 -(BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector 226 229 { 230 RT_NOREF(control, textView); 227 231 // NSLog(NSStringFromSelector(commandSelector)); 228 232 /* Don't execute the selector for Enter & Escape. */ -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_cocoa.mm
r52727 r63492 26 26 bool darwinCreateMachineShortcut(NativeNSStringRef pstrSrcFile, NativeNSStringRef pstrDstPath, NativeNSStringRef pstrName, NativeNSStringRef /* pstrUuid */) 27 27 { 28 RT_NOREF(pstrName); 28 29 if (!pstrSrcFile || !pstrDstPath) 29 30 return false; -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
r61244 r63492 215 215 void darwinMinaturizeWindow(NativeNSWindowRef pWindow) 216 216 { 217 RT_NOREF(pWindow); 217 218 // [[NSApplication sharedApplication] miniaturizeAll]; 218 219 // printf("bla\n"); … … 313 314 void darwinWindowAnimateResizeImpl(NativeNSWindowRef pWindow, int x, int y, int width, int height) 314 315 { 316 RT_NOREF(x, y, width); 317 315 318 /* It seems that Qt doesn't return the height of the window with the 316 319 * toolbar height included. So add this size manually. Could easily be that … … 514 517 bool darwinUnifiedToolbarEvents(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser) 515 518 { 519 RT_NOREF(pvCarbonEvent); 520 516 521 NSEvent *pEvent = (NSEvent*)pvCocoaEvent; 517 522 NSEventType EvtType = [pEvent type]; … … 663 668 - (NSSize)qtWindowWillResize:(NSWindow *)pWindow toSize:(NSSize)newFrameSize 664 669 { 670 RT_NOREF(pWindow); 665 671 /* This is a fake implementation. It will be replaced by the original Qt 666 672 method. */ -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/vmstarter.mm
r63485 r63492 17 17 18 18 #import <Cocoa/Cocoa.h> 19 #include <iprt/cdefs.h> 19 20 20 21 @interface AppDelegate: NSObject … … 47 48 - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames 48 49 { 50 RT_NOREF(sender); 51 49 52 BOOL fResult = FALSE; 50 53 NSWorkspace *pWS = [NSWorkspace sharedWorkspace]; … … 73 76 NSTask, cause it makes sure that VBox will become the front most 74 77 process after starting up. */ 78 /** @todo should replace all this with -[NSWorkspace 79 * launchApplicationAtURL:options:configuration:error:] because LSOpenApplication is deprecated in 80 * 10.10 while, FSPathMakeRef is deprecated since 10.8. */ 81 /* The state horror show starts right here: */ 75 82 OSStatus err = noErr; 76 83 Boolean fDir; … … 85 92 { 86 93 NSString *strVBoxExe = [m_strVBoxPath stringByAppendingPathComponent:@"Contents/MacOS/VirtualBox"]; 87 if ((err = FSPathMakeRef((const UInt8*)[strVBoxExe UTF8String], &fileRef, &fDir)) != noErr) 94 err = FSPathMakeRef((const UInt8*)[strVBoxExe UTF8String], &fileRef, &fDir); 95 if (err != noErr) 88 96 break; 89 if ((args = CFArrayCreate(NULL, (const void**)list, [filenames count], &kCFTypeArrayCallBacks)) == NULL) 97 args = CFArrayCreate(NULL, (const void **)list, [filenames count], &kCFTypeArrayCallBacks); 98 if (args == NULL) 90 99 break; 91 100 LSApplicationParameters par = { 0, 0, &fileRef, asyncLaunchRefCon, 0, args, 0 }; 92 if ((err = LSOpenApplication(&par, NULL)) != noErr) 101 err = LSOpenApplication(&par, NULL); 102 if (err != noErr) 93 103 break; 94 104 fResult = TRUE; 95 105 }while(0); 96 if (list) 106 if (list) /* Why bother checking, because you've crashed already if it's NULL! */ 97 107 free(list); 98 108 if (file) … … 104 114 @end 105 115 106 int main( int argc, char *argv[])116 int main() 107 117 { 108 118 /* Global auto release pool. */ 109 119 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 110 120 /* Create our own delegate for the application. */ 111 [[NSApplication sharedApplication] setDelegate: [[AppDelegate alloc] init]]; 121 AppDelegate *pAppDelegate = [[AppDelegate alloc] init]; 122 [[NSApplication sharedApplication] setDelegate: (id<NSApplicationDelegate>)pAppDelegate]; /** @todo check out ugly cast */ 123 pAppDelegate = nil; 112 124 /* Start the event loop. */ 113 125 [NSApp run]; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r63383 r63492 1731 1731 /* Disable mouse and keyboard event compression/delaying 1732 1732 * to make sure we *really* get all of the events: */ 1733 ::CGSetLocalEventsSuppressionInterval(0.0); 1733 ::CGSetLocalEventsSuppressionInterval(0.0); /** @todo replace with CGEventSourceSetLocalEventsSuppressionInterval ? */ 1734 1734 ::darwinSetMouseCoalescingEnabled(false); 1735 1735
Note:
See TracChangeset
for help on using the changeset viewer.