Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bool Database::load(const QString &filename)
  2. {
  3.     bool opened = false;
  4.  
  5.     if (!filename.isEmpty())
  6.     {
  7.         QFile file(filename);
  8.  
  9.         opened = file.open(QIODevice::ReadOnly);
  10.  
  11.         if (opened)
  12.         {
  13.             modified = false;
  14.  
  15.             QDataStream output(&file);
  16.  
  17.             output >> db >> ids >> maxId;
  18.  
  19.             file.close();
  20.         }
  21.     }
  22.  
  23.     return opened;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement