mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Fix Dock drag and drop
This commit is contained in:
parent
fa954394cc
commit
d95e533441
1
.gitignore
vendored
1
.gitignore
vendored
@ -235,7 +235,6 @@ Makefile
|
|||||||
|
|
||||||
uefitool_plugin_import.cpp
|
uefitool_plugin_import.cpp
|
||||||
UEFITool.app/
|
UEFITool.app/
|
||||||
UEFITool/Info.plist
|
|
||||||
UEFITool/XCBuildData
|
UEFITool/XCBuildData
|
||||||
UEFIDump/UEFIDump
|
UEFIDump/UEFIDump
|
||||||
UEFIExtract/UEFIExtract
|
UEFIExtract/UEFIExtract
|
||||||
|
33
UEFITool/Info.plist
Normal file
33
UEFITool/Info.plist
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>uefitool</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>UEFITool NE</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>UEFITool</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.longsoft.UEFITool</string>
|
||||||
|
<key>CFBundleDocumentTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>*</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
<key>LSHandlerRank</key>
|
||||||
|
<string>None</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -122,4 +122,7 @@ FORMS += uefitool.ui \
|
|||||||
RESOURCES += uefitool.qrc
|
RESOURCES += uefitool.qrc
|
||||||
RC_FILE = uefitool.rc
|
RC_FILE = uefitool.rc
|
||||||
ICON = icons/uefitool.icns
|
ICON = icons/uefitool.icns
|
||||||
|
ICONFILE.files = icons/uefitool.icns
|
||||||
|
ICONFILE.path = Contents/Resources
|
||||||
|
QMAKE_BUNDLE_DATA += ICONFILE
|
||||||
|
QMAKE_INFO_PLIST = Info.plist
|
||||||
|
@ -15,18 +15,41 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include "uefitool.h"
|
#include "uefitool.h"
|
||||||
|
|
||||||
|
class UEFIToolApplication : public QApplication
|
||||||
|
{
|
||||||
|
UEFITool tool;
|
||||||
|
public:
|
||||||
|
UEFIToolApplication(int &argc, char **argv)
|
||||||
|
: QApplication(argc, argv)
|
||||||
|
{
|
||||||
|
setOrganizationName("LongSoft");
|
||||||
|
setOrganizationDomain("longsoft.org");
|
||||||
|
setApplicationName("UEFITool");
|
||||||
|
}
|
||||||
|
|
||||||
|
int startup()
|
||||||
|
{
|
||||||
|
tool.setProgramPath(arguments().at(0));
|
||||||
|
if (arguments().length() > 1)
|
||||||
|
tool.openImageFile(arguments().at(1));
|
||||||
|
tool.show();
|
||||||
|
|
||||||
|
return exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool event(QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() == QEvent::FileOpen) {
|
||||||
|
QFileOpenEvent *openEvent = static_cast<QFileOpenEvent *>(event);
|
||||||
|
tool.openImageFile(openEvent->file());
|
||||||
|
}
|
||||||
|
|
||||||
|
return QApplication::event(event);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
UEFIToolApplication a(argc, argv);
|
||||||
a.setOrganizationName("LongSoft");
|
return a.startup();
|
||||||
a.setOrganizationDomain("longsoft.org");
|
|
||||||
a.setApplicationName("UEFITool");
|
|
||||||
|
|
||||||
UEFITool w;
|
|
||||||
w.setProgramPath(a.arguments().at(0));
|
|
||||||
if (a.arguments().length() > 1)
|
|
||||||
w.openImageFile(a.arguments().at(1));
|
|
||||||
w.show();
|
|
||||||
|
|
||||||
return a.exec();
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user