Skip to content

Commit 6c59fb5

Browse files
Remove unused webkit
1 parent ca01d51 commit 6c59fb5

File tree

6 files changed

+470
-419
lines changed

6 files changed

+470
-419
lines changed

QuickDialog.xcodeproj/project.pbxproj

Lines changed: 155 additions & 116 deletions
Large diffs are not rendered by default.

extras/QWebElement.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,28 @@
1111
// ANY KIND, either express or implied. See the License for the specific language governing
1212
// permissions and limitations under the License.
1313
//
14-
15-
#import <Foundation/Foundation.h>
16-
#import "QuickDialog.h"
17-
18-
/**
19-
QWebElement: pushes a simple browser that opens the URL defined in the element
20-
*/
21-
22-
@interface QWebElement : QLabelElement {
23-
24-
@protected
25-
NSString *_url;
26-
NSString *_html;
27-
}
28-
29-
@property(nonatomic, strong) NSString *url;
30-
@property(nonatomic, strong) NSString *html;
31-
@property(nonatomic, readonly) NSString *file;
32-
33-
- (QWebElement *)initWithTitle:(NSString *)title url:(NSString *)url;
34-
- (QWebElement *)initWithTitle:(NSString *)title HTML:(NSString *)html;
35-
36-
- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)path;
37-
38-
@end
14+
//
15+
//#import <Foundation/Foundation.h>
16+
//#import "QuickDialog.h"
17+
//
18+
///**
19+
// QWebElement: pushes a simple browser that opens the URL defined in the element
20+
//*/
21+
//
22+
//@interface QWebElement : QLabelElement {
23+
//
24+
//@protected
25+
// NSString *_url;
26+
// NSString *_html;
27+
//}
28+
//
29+
//@property(nonatomic, strong) NSString *url;
30+
//@property(nonatomic, strong) NSString *html;
31+
//@property(nonatomic, readonly) NSString *file;
32+
//
33+
//- (QWebElement *)initWithTitle:(NSString *)title url:(NSString *)url;
34+
//- (QWebElement *)initWithTitle:(NSString *)title HTML:(NSString *)html;
35+
//
36+
//- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)path;
37+
//
38+
//@end

extras/QWebElement.m

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -11,60 +11,60 @@
1111
// ANY KIND, either express or implied. See the License for the specific language governing
1212
// permissions and limitations under the License.
1313
//
14-
15-
#import "QWebElement.h"
16-
#import "QuickDialog.h"
17-
#import "QWebViewController.h"
18-
19-
@implementation QWebElement
20-
21-
- (QWebElement *)initWithTitle:(NSString *)title url:(NSString *)url {
22-
self = [super init];
23-
if (self!=nil){
24-
_url = url;
25-
_title = title;
26-
}
27-
return self;
28-
}
29-
30-
- (QWebElement *)initWithTitle:(NSString *)title HTML:(NSString *)html {
31-
32-
self = [super init];
33-
if (self!=nil){
34-
_url = nil;
35-
_title = title;
36-
_html = html;
37-
}
38-
return self;
39-
}
40-
41-
-(void)setFile:(NSString *)filename {
42-
_url = [[NSBundle mainBundle] pathForResource:filename ofType:@"html"];
43-
}
44-
45-
- (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller {
46-
self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
47-
UITableViewCell *cell = [super getCellForTableView:tableView controller:controller];
48-
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
49-
return cell;
50-
}
51-
52-
53-
- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)path {
54-
[self performAction];
55-
if (_html) {
56-
QWebViewController *webController = [[QWebViewController alloc] initWithHTML:_html];
57-
webController.title = self.title;
58-
[controller displayViewController:webController];
59-
}
60-
else {
61-
if ([_url hasPrefix:@"http"] || [_url hasPrefix:@"/"]) {
62-
QWebViewController *webController = [[QWebViewController alloc] initWithUrl:_url];
63-
[controller displayViewController:webController withPresentationMode:self.presentationMode];
64-
} else {
65-
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:_url]];
66-
[tableView deselectRowAtIndexPath:path animated:NO];
67-
}
68-
}
69-
}
70-
@end
14+
//
15+
//#import "QWebElement.h"
16+
//#import "QuickDialog.h"
17+
//#import "QWebViewController.h"
18+
//
19+
//@implementation QWebElement
20+
//
21+
//- (QWebElement *)initWithTitle:(NSString *)title url:(NSString *)url {
22+
// self = [super init];
23+
// if (self!=nil){
24+
// _url = url;
25+
// _title = title;
26+
// }
27+
// return self;
28+
//}
29+
//
30+
//- (QWebElement *)initWithTitle:(NSString *)title HTML:(NSString *)html {
31+
//
32+
// self = [super init];
33+
// if (self!=nil){
34+
// _url = nil;
35+
// _title = title;
36+
// _html = html;
37+
// }
38+
// return self;
39+
//}
40+
//
41+
//-(void)setFile:(NSString *)filename {
42+
// _url = [[NSBundle mainBundle] pathForResource:filename ofType:@"html"];
43+
//}
44+
//
45+
//- (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller {
46+
// self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
47+
// UITableViewCell *cell = [super getCellForTableView:tableView controller:controller];
48+
// cell.selectionStyle = UITableViewCellSelectionStyleBlue;
49+
// return cell;
50+
//}
51+
//
52+
//
53+
//- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)path {
54+
// [self performAction];
55+
// if (_html) {
56+
// QWebViewController *webController = [[QWebViewController alloc] initWithHTML:_html];
57+
// webController.title = self.title;
58+
// [controller displayViewController:webController];
59+
// }
60+
// else {
61+
// if ([_url hasPrefix:@"http"] || [_url hasPrefix:@"/"]) {
62+
// QWebViewController *webController = [[QWebViewController alloc] initWithUrl:_url];
63+
// [controller displayViewController:webController withPresentationMode:self.presentationMode];
64+
// } else {
65+
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:_url]];
66+
// [tableView deselectRowAtIndexPath:path animated:NO];
67+
// }
68+
// }
69+
//}
70+
//@end

extras/QWebViewController.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
// permissions and limitations under the License.
1313
//
1414

15-
16-
#import <Foundation/Foundation.h>
17-
#import <UIKit/UIKit.h>
18-
#import <WebKit/WebKit.h>
19-
20-
@interface QWebViewController : UIViewController <UIWebViewDelegate> {
21-
22-
@private
23-
WKWebView *_webView;
24-
NSString *_url;
25-
NSString *_html;
26-
}
27-
28-
- (QWebViewController *)initWithUrl:(NSString *)string;
29-
- (QWebViewController *)initWithHTML:(NSString *)html;
30-
@end
15+
//
16+
//#import <Foundation/Foundation.h>
17+
//#import <UIKit/UIKit.h>
18+
//#import <WebKit/WebKit.h>
19+
//
20+
//@interface QWebViewController : UIViewController <WKNavigationDelegate> {
21+
//
22+
//@private
23+
// WKWebView *_webView;
24+
// NSString *_url;
25+
// NSString *_html;
26+
//}
27+
//
28+
//- (QWebViewController *)initWithUrl:(NSString *)string;
29+
//- (QWebViewController *)initWithHTML:(NSString *)html;
30+
//@end

0 commit comments

Comments
 (0)