mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
Applications: Use pledge()
Add some basic pledges to the following apps: - Calculator - DisplayProperties - FontEditor - HexEditor - PaintBrush
This commit is contained in:
parent
6182a1a71c
commit
56428e764e
5 changed files with 55 additions and 0 deletions
|
@ -11,11 +11,22 @@
|
|||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GMessageBox.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio shared_buffer unix rpath wpath cpath fattr", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
GApplication app(argc, argv);
|
||||
|
||||
if (pledge("stdio shared_buffer rpath wpath cpath", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto window = GWindow::construct();
|
||||
window->set_title("PaintBrush");
|
||||
window->set_rect(100, 100, 640, 480);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue