MCPcopy Create free account
hub / github.com/cxasm/notepad-- / openfile

Function openfile

src/main.cpp:77–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75#ifdef Q_OS_MAC
76
77static void openfile(QString filePath)
78{
79
80 qlonglong winId;
81 shared.lock();
82 memcpy(&winId,shared.data(),sizeof(qlonglong));
83 shared.unlock();
84
85 QWidget *pMain = QWidget::find((WId)winId);
86 CCNotePad* pNotePad = dynamic_cast<CCNotePad*>(pMain);
87 if(pNotePad != nullptr)
88 {
89 if(!filePath.isEmpty())
90 {
91 pNotePad->openFile(filePath);
92 }
93 pNotePad->activateWindow();
94 pNotePad->showNormal();
95 }
96}
97
98class MyApplication : public QApplication
99{

Callers 1

eventMethod · 0.85

Calls 3

dataMethod · 0.80
isEmptyMethod · 0.80
openFileMethod · 0.80

Tested by

no test coverage detected