Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,11 @@ def checkHdr(self):
asResults, _ = self.findFiles(sCurSearchPath, asHdrToSearch, fAbsolute = True, fStripFilenames = True);
for sResIncFile, dictRes in asResults.items():
sIncPath = dictRes['found_path'];
if sIncPath \
and self.enmBuildTarget == BuildTarget.DARWIN \
and sResIncFile == 'iostream' \
and '/opt/homebrew/include/c++/' in sIncPath:
continue;
if sIncPath \
and sResIncFile not in setHdrFound: # Take the first match found.
setHdrFound[sResIncFile] = sIncPath;
Expand Down Expand Up @@ -1764,8 +1769,12 @@ def checkCallback_qt(self):
sPathBin = None;
sPathLibExec = None;

# Check if we have our own pre-compiled Qt in tools first.
sPathBase = self.getToolPath();
# Check if we have our own pre-compiled Qt in tools first. A custom
# Darwin path may point at a normal framework installation instead.
if self.enmBuildTarget == BuildTarget.DARWIN and self.sRootPath:
sPathBase = None;
else:
sPathBase = self.getToolPath();
if sPathBase:
self.asLibFiles = [ 'libQt6CoreVBox' ];
g_oEnv.set('VBOX_WITH_ORACLE_QT', '1');
Expand Down Expand Up @@ -1803,10 +1812,11 @@ def checkCallback_qt(self):

# Search for the library file.
# Note: Ordered by precedence. Do not change!
asPath = [ sPathBase,
getPackagePath('qt@6')[1],
'/System/Library',
'/Library' ];
asPath = [ self.sRootPath,
sPathBase,
getPackagePath('qt@6')[1],
'/System/Library',
'/Library' ];
sPathFramework = None;
for sPathBase in asPath:
if not sPathBase: # No custom path? Skip.
Expand All @@ -1825,14 +1835,16 @@ def checkCallback_qt(self):
break;

if sPathFramework:
sPathFrameworkParent = os.path.dirname(sPathFramework);
# We need to clear the library defined the the LibraryCheck definition
# -- macOS uses the framework concept instead.
self.asLibFiles = [];
self.asLibPaths.insert(0, sPathFramework);
self.asLibPaths.insert(0, sPathFrameworkParent);
# Include the framework headers.
self.asIncPaths.insert(0, f'{sPathBase}/lib/QtCore.framework/Headers');
self.asIncPaths.insert(0, os.path.join(sPathFramework, 'Headers'));
# More stuff needed in order to get it linked.
self.asLinkerArgs.extend([ '-std=c++17', '-framework', 'QtCore', '-F', f'{sPathBase}/lib', '-g', '-O', '-Wall' ]);
self.asCompilerArgs.extend([ '-F', sPathFrameworkParent ]);
self.asLinkerArgs.extend([ '-std=c++17', '-framework', 'QtCore', '-F', sPathFrameworkParent, '-g', '-O', '-Wall' ]);

sPkgName = 'Qt6Core'; ## @todo Make the code generic once we have similar SDKs.
if sPathBase:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,19 @@ QString UINativeHotKey::toString(int iKeyCode)
{
case shiftKey:
case rightShiftKey:
strKeyName = strKeyName.arg(QChar(kShiftUnicode));
strKeyName = strKeyName.arg(QChar(static_cast<ushort>(kShiftUnicode)));
break;
case optionKey:
case rightOptionKey:
strKeyName = strKeyName.arg(QChar(kOptionUnicode));
strKeyName = strKeyName.arg(QChar(static_cast<ushort>(kOptionUnicode)));
break;
case controlKey:
case rightControlKey:
strKeyName = strKeyName.arg(QChar(kControlUnicode));
strKeyName = strKeyName.arg(QChar(static_cast<ushort>(kControlUnicode)));
break;
case cmdKey:
case kEventKeyModifierRightCmdKeyMask:
strKeyName = strKeyName.arg(QChar(kCommandUnicode));
strKeyName = strKeyName.arg(QChar(static_cast<ushort>(kCommandUnicode)));
break;
}

Expand Down
3 changes: 2 additions & 1 deletion src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ int HostDnsServiceDarwin::updateInfo(void)
{
CFStringRef const serverAddressRef = (CFStringRef)CFArrayGetValueAtIndex(serverArrayRef, i);
if (serverAddressRef)
{
if (!queryCFStringAsUtf8Str(serverAddressRef, strTmp, _16K))
{
LogRel(("HostDnsServiceDarwin: idx: %u: Failed to convert address.\n", i));
Expand Down Expand Up @@ -273,6 +274,7 @@ int HostDnsServiceDarwin::updateInfo(void)
}
else
LogRel(("HostDnsServiceDarwin: line %u: bad nameserver address %s\n", i, strTmp.c_str()));
}
}
}

Expand Down Expand Up @@ -313,4 +315,3 @@ void HostDnsServiceDarwin::Data::performShutdownCallback(void *pInfo)
AssertPtrReturnVoid(pThis->m);
ASMAtomicXchgBool(&pThis->m->m_fStop, true);
}

3 changes: 1 addition & 2 deletions src/VBox/Main/src-server/darwin/HostPowerDarwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void HostPowerServiceDarwin::checkBatteryCriticalLevel(bool *pfCriticalChanged)
result = CFDictionaryGetValueIfPresent(pSource, CFSTR(kIOPSDeadWarnLevelKey), &psValue);
if (result)
CFNumberGetValue((CFNumberRef)psValue, kCFNumberSInt32Type, &criticalValue);
critical = remCapacity < criticalValue;
critical = remCapacity < (float)criticalValue;

/* We have to take action only if we are on battery, the
* previous state wasn't critical, the state has changed & the
Expand All @@ -249,4 +249,3 @@ void HostPowerServiceDarwin::checkBatteryCriticalLevel(bool *pfCriticalChanged)
CFRelease(pBlob);
CFRelease(pSources);
}