Compare commits
1 Commits
64c4d2e064
...
macos
Author | SHA1 | Date | |
---|---|---|---|
7cdaa4072c |
1
.github/workflows/macos.yml
vendored
1
.github/workflows/macos.yml
vendored
@ -13,7 +13,6 @@ jobs:
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: '6.8.1'
|
||||
modules: 'qtimageformats'
|
||||
- name: Run a qt project
|
||||
run: |
|
||||
cmake . -Bbuild
|
||||
|
@ -212,7 +212,7 @@ elseif (APPLE)
|
||||
# See https://cmake.org/cmake/help/v3.15/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html
|
||||
set_target_properties(${EXE_NAME} PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/dist/MacOSXBundleInfo.plist.in
|
||||
MACOSX_BUNDLE_INFO_PLIST dist/MacOSXBundleInfo.plist.in
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "Pineapple Pictures"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER net.blumia.pineapple-pictures
|
||||
MACOSX_BUNDLE_ICON_FILE app-icon.icns # contains the .icns file name, *without* the path.
|
||||
|
@ -160,10 +160,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
installResizeCapture(m_graphicsView->viewport());
|
||||
installResizeCapture(m_gv);
|
||||
installResizeCapture(m_gv->viewport());
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
qApp->installEventFilter(this);
|
||||
#endif // Q_OS_MACOS
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@ -657,19 +653,6 @@ QSize MainWindow::sizeHint() const
|
||||
return QSize(710, 530);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
bool MainWindow::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
if (event->type() == QEvent::FileOpen) {
|
||||
QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent *>(event);
|
||||
showUrls({fileOpenEvent->url()});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // Q_OS_MACOS
|
||||
|
||||
void MainWindow::on_actionOpen_triggered()
|
||||
{
|
||||
QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation);
|
||||
|
@ -77,9 +77,6 @@ protected slots:
|
||||
|
||||
protected:
|
||||
QSize sizeHint() const override;
|
||||
#ifdef Q_OS_MACOS
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
#endif // Q_OS_MACOS
|
||||
|
||||
private slots:
|
||||
void on_actionOpen_triggered();
|
||||
|
2
dist/MacOSXBundleInfo.plist.in
vendored
2
dist/MacOSXBundleInfo.plist.in
vendored
@ -30,6 +30,8 @@
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<!-- JPEG -->
|
||||
|
Reference in New Issue
Block a user