VirtualBox

Changeset 63492 in vbox


Ignore:
Timestamp:
Aug 15, 2016 4:58:41 PM (8 years ago)
Author:
vboxsync
Message:

QtGui: warnings (clang)

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r63291 r63492  
    244244VirtualBox_CXXFLAGS += -Wno-switch
    245245endif
     246
     247## @todo we're using a number of deprecated APIs, please fix and remove these!
     248VirtualBox_CXXFLAGS.darwin    += -Wno-deprecated-declarations
     249VirtualBox_OBJCFLAGS.darwin   += -Wno-deprecated-declarations
     250VirtualBox_OBJCXXFLAGS.darwin += -Wno-deprecated-declarations
    246251
    247252ifeq ($(KBUILD_TYPE),release)
     
    11241129 endif # VBOX_WITH_QTGUI_V5
    11251130
    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)/
    11271132        $(call MSG_GENERATE,VirtualBox.app,$<,$@)
    11281133        $(QUIET)$(RM) -f $@
     
    11371142                $< > $@
    11381143
    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)/
    11401145        $(QUIET)$(RM) -f $@
    11411146        $(QUIET)$(APPEND) $@ "[Paths]"
    11421147        $(QUIET)$(APPEND) $@ "Prefix =" $(PATH_OUT)/$(VirtualBox.app_INST)
    11431148
    1144 INSTALLS += VirtualBoxVM.app
    1145 VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
    1146 VirtualBoxVM.app_MODE = 644
    1147 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)/
    11551160        $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
    11561161        $(QUIET)$(RM) -f $@
     
    11651170                --output $@ $<
    11661171
    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)/
    11841190        $(call MSG_GENERATE,vmstarter.app,$<,$@)
    11851191        $(QUIET)$(RM) -f $@
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r63305 r63492  
    476476        mType(aType),
    477477        mInitialized(false)
    478     {}
     478    { NOREF(mType); }
    479479
    480480
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r63323 r63492  
    46874687    psn.highLongOfPSN = id >> 32;
    46884688    psn.lowLongOfPSN = (UInt32)id;
     4689# ifdef __clang__
     4690#  pragma GCC diagnostic push
     4691#  pragma GCC diagnostic ignored "-Wdeprecated-declarations"
    46894692    OSErr rc = ::SetFrontProcess(&psn);
     4693#  pragma GCC diagnostic pop
     4694# else
     4695    OSErr rc = ::SetFrontProcess(&psn);
     4696# endif
    46904697    if (!rc)
    46914698        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  
    212212- (void)drawRect:(NSRect)aRect
    213213{
     214    RT_NOREF(aRect);
    214215    NSGraphicsContext *nsContext = [NSGraphicsContext currentContext];
    215216    CGContextRef pCGContext = (CGContextRef)[nsContext graphicsPort];
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm

    r61244 r63492  
    4343#include <QMacCocoaViewContainer>
    4444
     45#if 0 /* This is a built-in according to clang. Not sure how it relates to QT_VERSION... */
    4546/* Interface Builder Constant,
    4647 * hmm, where is it declared with Qt4? */
     
    4849# define IBAction void
    4950#endif /* QT_VERSION >= 0x050000 */
     51#endif
    5052
    5153/*
     
    107109-(IBAction)clicked:(id)sender
    108110{
     111    RT_NOREF(sender);
    109112    mRealTarget->onClicked();
    110113}
     
    225228-(BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
    226229{
     230    RT_NOREF(control, textView);
    227231//    NSLog(NSStringFromSelector(commandSelector));
    228232    /* Don't execute the selector for Enter & Escape. */
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIDesktopServices_darwin_cocoa.mm

    r52727 r63492  
    2626bool darwinCreateMachineShortcut(NativeNSStringRef pstrSrcFile, NativeNSStringRef pstrDstPath, NativeNSStringRef pstrName, NativeNSStringRef /* pstrUuid */)
    2727{
     28    RT_NOREF(pstrName);
    2829    if (!pstrSrcFile || !pstrDstPath)
    2930        return false;
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm

    r61244 r63492  
    215215void darwinMinaturizeWindow(NativeNSWindowRef pWindow)
    216216{
     217    RT_NOREF(pWindow);
    217218//    [[NSApplication sharedApplication] miniaturizeAll];
    218219//    printf("bla\n");
     
    313314void darwinWindowAnimateResizeImpl(NativeNSWindowRef pWindow, int x, int y, int width, int height)
    314315{
     316    RT_NOREF(x, y, width);
     317
    315318    /* It seems that Qt doesn't return the height of the window with the
    316319     * toolbar height included. So add this size manually. Could easily be that
     
    514517bool darwinUnifiedToolbarEvents(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser)
    515518{
     519    RT_NOREF(pvCarbonEvent);
     520
    516521    NSEvent *pEvent = (NSEvent*)pvCocoaEvent;
    517522    NSEventType EvtType = [pEvent type];
     
    663668- (NSSize)qtWindowWillResize:(NSWindow *)pWindow toSize:(NSSize)newFrameSize
    664669{
     670    RT_NOREF(pWindow);
    665671    /* This is a fake implementation. It will be replaced by the original Qt
    666672       method. */
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/vmstarter.mm

    r63485 r63492  
    1717
    1818#import <Cocoa/Cocoa.h>
     19#include <iprt/cdefs.h>
    1920
    2021@interface AppDelegate: NSObject
     
    4748- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
    4849{
     50    RT_NOREF(sender);
     51
    4952    BOOL fResult = FALSE;
    5053    NSWorkspace *pWS = [NSWorkspace sharedWorkspace];
     
    7376           NSTask, cause it makes sure that VBox will become the front most
    7477           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: */
    7582        OSStatus err = noErr;
    7683        Boolean fDir;
     
    8592        {
    8693            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)
    8896                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)
    9099                break;
    91100            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)
    93103                break;
    94104            fResult = TRUE;
    95105        }while(0);
    96         if (list)
     106        if (list)  /* Why bother checking, because you've crashed already if it's NULL! */
    97107            free(list);
    98108        if (file)
     
    104114@end
    105115
    106 int main(int argc, char *argv[])
     116int main()
    107117{
    108118    /* Global auto release pool. */
    109119    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    110120    /* 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;
    112124    /* Start the event loop. */
    113125    [NSApp run];
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r63383 r63492  
    17311731                        /* Disable mouse and keyboard event compression/delaying
    17321732                         * to make sure we *really* get all of the events: */
    1733                         ::CGSetLocalEventsSuppressionInterval(0.0);
     1733                        ::CGSetLocalEventsSuppressionInterval(0.0); /** @todo replace with CGEventSourceSetLocalEventsSuppressionInterval ? */
    17341734                        ::darwinSetMouseCoalescingEnabled(false);
    17351735
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette