From 02cf5ded122458f9dcccf7f75a2f33430fc91f7e Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 1 Sep 2021 09:07:20 +1000 Subject: [PATCH] [macOS] Tidy up imports (#301) --- macos/QMK Toolbox/AppDelegate.h | 3 +-- macos/QMK Toolbox/AppDelegate.m | 5 ++++- macos/QMK Toolbox/Constants.m | 1 + macos/QMK Toolbox/Flashing.h | 4 ++-- macos/QMK Toolbox/Flashing.m | 1 + macos/QMK Toolbox/HIDConsole/HIDConsoleDevice.h | 1 + macos/QMK Toolbox/HIDConsole/HIDConsoleListener.h | 2 +- macos/QMK Toolbox/Printing.h | 3 +-- macos/QMK Toolbox/QMKWindow.h | 1 - macos/QMK Toolbox/QMKWindow.m | 2 ++ macos/QMK Toolbox/USB.h | 2 +- macos/QMK Toolbox/USB.m | 7 ++++--- 12 files changed, 19 insertions(+), 13 deletions(-) diff --git a/macos/QMK Toolbox/AppDelegate.h b/macos/QMK Toolbox/AppDelegate.h index 67f49f0e46..f7d54f22a8 100644 --- a/macos/QMK Toolbox/AppDelegate.h +++ b/macos/QMK Toolbox/AppDelegate.h @@ -7,9 +7,8 @@ // #import + #import "Printing.h" -#import "Flashing.h" -#import "USB.h" @interface AppDelegate : NSObject { diff --git a/macos/QMK Toolbox/AppDelegate.m b/macos/QMK Toolbox/AppDelegate.m index 873480a934..ccd1f288ac 100644 --- a/macos/QMK Toolbox/AppDelegate.m +++ b/macos/QMK Toolbox/AppDelegate.m @@ -7,9 +7,12 @@ // #import "AppDelegate.h" + #import "Constants.h" -#import "QMKWindow.h" +#import "Flashing.h" #import "HIDConsoleListener.h" +#import "QMKWindow.h" +#import "USB.h" @interface AppDelegate () diff --git a/macos/QMK Toolbox/Constants.m b/macos/QMK Toolbox/Constants.m index 6c2d5f81dc..8814a30db7 100644 --- a/macos/QMK Toolbox/Constants.m +++ b/macos/QMK Toolbox/Constants.m @@ -7,6 +7,7 @@ // #import + #import "Constants.h" NSString * const QMKMicrocontrollerKey = @"Microcontroller"; diff --git a/macos/QMK Toolbox/Flashing.h b/macos/QMK Toolbox/Flashing.h index a2af425c59..a021ac4fe8 100644 --- a/macos/QMK Toolbox/Flashing.h +++ b/macos/QMK Toolbox/Flashing.h @@ -7,8 +7,8 @@ // #import -#include -#include "Printing.h" + +#import "Printing.h" typedef enum { APM32DFU, diff --git a/macos/QMK Toolbox/Flashing.m b/macos/QMK Toolbox/Flashing.m index 4a978e4819..234087f1df 100644 --- a/macos/QMK Toolbox/Flashing.m +++ b/macos/QMK Toolbox/Flashing.m @@ -7,6 +7,7 @@ // #import "Flashing.h" + #import "USB.h" @interface Flashing () diff --git a/macos/QMK Toolbox/HIDConsole/HIDConsoleDevice.h b/macos/QMK Toolbox/HIDConsole/HIDConsoleDevice.h index a2d90af9f7..5bc86b1140 100644 --- a/macos/QMK Toolbox/HIDConsole/HIDConsoleDevice.h +++ b/macos/QMK Toolbox/HIDConsole/HIDConsoleDevice.h @@ -1,4 +1,5 @@ #import + #import @class HIDConsoleDevice; diff --git a/macos/QMK Toolbox/HIDConsole/HIDConsoleListener.h b/macos/QMK Toolbox/HIDConsole/HIDConsoleListener.h index 56cf832ed0..0cd4c53ddb 100644 --- a/macos/QMK Toolbox/HIDConsole/HIDConsoleListener.h +++ b/macos/QMK Toolbox/HIDConsole/HIDConsoleListener.h @@ -1,6 +1,6 @@ #import -#include "HIDConsoleDevice.h" +#import "HIDConsoleDevice.h" @protocol HIDConsoleListenerDelegate - (void)consoleDeviceDidConnect:(HIDConsoleDevice *)device; diff --git a/macos/QMK Toolbox/Printing.h b/macos/QMK Toolbox/Printing.h index 882ffc61a8..77828329f1 100644 --- a/macos/QMK Toolbox/Printing.h +++ b/macos/QMK Toolbox/Printing.h @@ -6,8 +6,7 @@ // Copyright © 2017 Jack Humbert. This code is licensed under MIT license (see LICENSE.md for details). // -#import -#include +#import @interface Printing : NSObject diff --git a/macos/QMK Toolbox/QMKWindow.h b/macos/QMK Toolbox/QMKWindow.h index 71ee904220..1694224f84 100644 --- a/macos/QMK Toolbox/QMKWindow.h +++ b/macos/QMK Toolbox/QMKWindow.h @@ -7,7 +7,6 @@ // #import -#import "AppDelegate.h" @interface QMKWindow : NSWindow diff --git a/macos/QMK Toolbox/QMKWindow.m b/macos/QMK Toolbox/QMKWindow.m index aee38c5e61..3b2552113b 100644 --- a/macos/QMK Toolbox/QMKWindow.m +++ b/macos/QMK Toolbox/QMKWindow.m @@ -8,6 +8,8 @@ #import "QMKWindow.h" +#import "AppDelegate.h" + @implementation QMKWindow - (void)setup { diff --git a/macos/QMK Toolbox/USB.h b/macos/QMK Toolbox/USB.h index ab14bae527..1eb2a2710b 100644 --- a/macos/QMK Toolbox/USB.h +++ b/macos/QMK Toolbox/USB.h @@ -7,7 +7,7 @@ // #import -#import + #import "Printing.h" #import "Flashing.h" diff --git a/macos/QMK Toolbox/USB.m b/macos/QMK Toolbox/USB.m index 9ae1955df8..885c9286de 100644 --- a/macos/QMK Toolbox/USB.m +++ b/macos/QMK Toolbox/USB.m @@ -6,10 +6,11 @@ // Copyright © 2017 Jack Humbert. This code is licensed under MIT license (see LICENSE.md for details). // +#import +#import +#import + #import "USB.h" -#include -#include -#include static io_iterator_t usbConnectedIter; static io_iterator_t usbDisconnectedIter;